coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Decimal time support in 'date'


From: Assaf Gordon
Subject: Re: Decimal time support in 'date'
Date: Fri, 13 Dec 2019 02:03:10 -0700

Hello,


On Thu, Dec 12, 2019 at 6:57 PM za3k--- via GNU coreutils General
Discussion <address@hidden> wrote:
>
> I am interested in adding support for decimal time to 'date', but before
> I dive into writing a patch, I wanted to ask whether the patch has a
> chance of being accepted--this may just be too obscure.

Thank you for the suggestion and for checking in first - that's an
excellent approach.

> In decimal time, 2019-12-12.75 would represent 2019-12-12T18:00:00.
> Decimal time in the modern era is mainly used in timekeeping (to track
> employee or contracting hours) and in scientific recording (to make
> drawing graphs easy). Astronomers use another form of decimal time on
> their own calendar and would not be supported.

This is an interesting idea, certainly worth discussing.
When such format is used by time-keepers or scientific recording, is
it being used
on the command-line or from a shell script? or is this more commonly
done in a higher-level programming language?
Can you expand on the other format used by Astronomers?

---

Before going further, please be aware that in order for such patch to
be accepted (or even evaluated), we'll need a copyright assignment
from you (and, potentially, from your employer or university, if you
implement it as part of work/school project).

To learn more, please see here:
  https://www.gnu.org/licenses/why-assign.en.html
To start the process, please fill the following form and send it to
address@hidden :
  
https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/Copyright/request-assign.future
(for the program/package question, please fill both "coreutils" and "gnulib")
---

On the technical side,
I expect such a patch to modify mainly gnulib's nstrftime.c module:
https://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/nstrftime.c
If we consider adding a new letter operator (e.g. "%X" ) we should
make sure it does not conflate with any existing letters, including on
non-gnu implementations (e.g. on BSDs).

regards,
  - assaf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]