[HN Gopher] Dte: A language for expressing and calculating date ...
___________________________________________________________________
Dte: A language for expressing and calculating date and time
Author : nixcraft
Score : 30 points
Date : 2021-11-13 18:05 UTC (4 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| bradknowles wrote:
| The most compact ISO-8601 format doesn't use any separators
| within the date or time values, just to designate where the date
| field ends and where the time field begins, and that's with an
| ASCII "T" character.
|
| So long as you know what the other fields are and what their
| sizes are, you don't really need separators.
| potiuper wrote:
| ISO(-8601) can go fly a kite. Dashes or forward slashes are
| confusable as subtraction and division respectively between
| numbers as year, month, and day separators. - and - do not have
| enough of a discernible difference to matter. Periods could work
| if not for the choice of using them to start file extensions.
| Commas are already used to group numbers in sets of 3 significant
| figures. Writing the year, month, and day as a sequence separated
| by commas is distinct as the month and day are at most 2 digits.
| jfarina wrote:
| sooooo....dollar signs? Exclamation points? What would you
| pick?
| contravariant wrote:
| My only grief with ISO8601 is that the way the timezones are
| denoted is somewhat unfortunate. Would have been nice if we
| could somehow have: 19:00+02:00 = 21:00+00:00 = 23:00-02:00,
| but alas.
|
| I suppose I should also be annoyed that I somehow never manage
| to type dates in the correct format if I need to write them by
| hand, but I'm not sure if I can blame ISO for that.
| zamadatix wrote:
| FWIW the symbol name specified is the Unicode "hypen-minus"
| symbol. The subtraction dash is a separate symbol.
|
| https://www.iso.org/obp/ui#iso:std:iso:8601:-1:ed-1:v1:en
|
| https://www.compart.com/en/unicode/U+002D
|
| https://www.compart.com/en/unicode/U+2212
|
| Edit: parent comment now reflects this.
|
| But the point of the standard isn't to provide something that
| everyone likes perfectly it's to provide a well defined format
| for exchanging datetimes instead of dealing with personal or
| cultural formats during interchange.
| KMnO4 wrote:
| Do you want to use forward slashes confusable as a multitude of
| other things, one of which is a path separator?
|
| At least you can have a file named data-2021-11-13.csv.
| Jaxan wrote:
| I worked in Germany for two years and they use dots:
| 2021.11.13. I really like this and quickly adopted this
| syntax myself.
|
| (I guess they do it the other way around though: 13.11.2021.)
| BiteCode_dev wrote:
| Somes tools will parse it as a file extension
| vasili111 wrote:
| >13.11.2021
|
| This is not only the German but most European way of
| writing date.
| macintux wrote:
| Very interesting. I need to start collecting libraries that are
| capable of manipulating incomplete dates; twice I've had to
| implement that for work projects (Erlang and Python), but this
| and pdd look promising.
| jfax wrote:
| Reminds me of the Ruby library chronic
| https://github.com/mojombo/chronic
|
| It's pretty good at natural language interpretation of dates, and
| the basic "from today" calculations, but cool to also see here
| natural expressions to parse between dates.
___________________________________________________________________
(page generated 2021-11-13 23:01 UTC)