Approxidate with YYYY.MM

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

Approxidate with YYYY.MM

From: Brian Gernhardt <hidden>
Date: 2016-06-15 22:51:12

(This is in response to a discussion on #parrot.)

Rakudo (https://github.com/rakudo/rakudo/) uses tags of the form YYYY.MM for their monthly releases.  When we were attempting to find the cause of a slowdown, somewhat was trying to find what commits occurred after the 2011.01 release with "git log --after=2011.01".  His mistake was pointed out but this led to the confusion of why this was parsed as "May 1 2011" instead of "Jan 1 2011".  Shouldn't date.c:match_multi_number() parse something with only two numbers as a beginning of month instead of allowing it to pass through to the generic parsing?

I'm currently nearing finals in school, so lack the time for an RFC patch at the moment.

~~ Brian

Re: Approxidate with YYYY.MM

From: Michael J Gruber <hidden>
Date: 2016-06-15 22:51:12

Brian Gernhardt venit, vidit, dixit 09.05.2011 21:02:
(This is in response to a discussion on #parrot.)

Rakudo (https://github.com/rakudo/rakudo/) uses tags of the form
YYYY.MM for their monthly releases.  When we were attempting to find
the cause of a slowdown, somewhat was trying to find what commits
occurred after the 2011.01 release with "git log --after=2011.01".
His mistake was pointed out but this led to the confusion of why this
was parsed as "May 1 2011" instead of "Jan 1 2011".  Shouldn't
date.c:match_multi_number() parse something with only two numbers as
a beginning of month instead of allowing it to pass through to the
generic parsing?
I just don't think there is a format like that. There is dd.mm.[yy]yy
and apparently also yyyy.mm.dd, but without leading zeros in mm for the
latter. Our date parser also takes "." for a space so that you don't
need to quote a space ("1.day.ago"). I can see the logic behind parsing
2011.01 as January 2011, but it's a stretch from the existing formats:

http://en.wikipedia.org/wiki/Calendar_date#Date_format
I'm currently nearing finals in school, so lack the time for an RFC
patch at the moment.
Good luck :)

Michael

Re: Approxidate with YYYY.MM

From: Andreas Ericsson <hidden>
Date: 2016-06-15 22:51:12

On 05/10/2011 08:35 AM, Michael J Gruber wrote:
Brian Gernhardt venit, vidit, dixit 09.05.2011 21:02:
quoted
(This is in response to a discussion on #parrot.)

Rakudo (https://github.com/rakudo/rakudo/) uses tags of the form
YYYY.MM for their monthly releases.  When we were attempting to find
the cause of a slowdown, somewhat was trying to find what commits
occurred after the 2011.01 release with "git log --after=2011.01".
His mistake was pointed out but this led to the confusion of why this
was parsed as "May 1 2011" instead of "Jan 1 2011".  Shouldn't
date.c:match_multi_number() parse something with only two numbers as
a beginning of month instead of allowing it to pass through to the
generic parsing?
I just don't think there is a format like that. There is dd.mm.[yy]yy
and apparently also yyyy.mm.dd, but without leading zeros in mm for the
latter. Our date parser also takes "." for a space so that you don't
need to quote a space ("1.day.ago"). I can see the logic behind parsing
2011.01 as January 2011, but it's a stretch from the existing formats:
It would be far more logical to parse "2011-01" as "January 2011" as
that's the preferred way to write month-precision dates in most
countries that use both the metric system and the gregorian calender.

I've never seen that date-type with dot as a separator, but with the
dash it's very, very common.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

Re: Approxidate with YYYY.MM

From: Michael J Gruber <hidden>
Date: 2016-06-15 22:51:12

Andreas Ericsson venit, vidit, dixit 10.05.2011 08:54:
On 05/10/2011 08:35 AM, Michael J Gruber wrote:
quoted
Brian Gernhardt venit, vidit, dixit 09.05.2011 21:02:
quoted
(This is in response to a discussion on #parrot.)

Rakudo (https://github.com/rakudo/rakudo/) uses tags of the form
YYYY.MM for their monthly releases.  When we were attempting to find
the cause of a slowdown, somewhat was trying to find what commits
occurred after the 2011.01 release with "git log --after=2011.01".
His mistake was pointed out but this led to the confusion of why this
was parsed as "May 1 2011" instead of "Jan 1 2011".  Shouldn't
date.c:match_multi_number() parse something with only two numbers as
a beginning of month instead of allowing it to pass through to the
generic parsing?
I just don't think there is a format like that. There is dd.mm.[yy]yy
and apparently also yyyy.mm.dd, but without leading zeros in mm for the
latter. Our date parser also takes "." for a space so that you don't
need to quote a space ("1.day.ago"). I can see the logic behind parsing
2011.01 as January 2011, but it's a stretch from the existing formats:
It would be far more logical to parse "2011-01" as "January 2011" as
that's the preferred way to write month-precision dates in most
countries that use both the metric system and the gregorian calender.

I've never seen that date-type with dot as a separator, but with the
dash it's very, very common.
Exactly that's what I wrote. People misuse the dot format probably as
frequently as the dash format, in the sense that the use an ordering
which is wrong for the respective separator. We currently parse n.m as
day n of month m of the current year for certain n only: We parse

31.3. as March 3rd of the current year
32.3. as May 3rd of 2032

(because May is the current month) which does not make that much sense,
admittedly. I would have hoped the latter to be April 1st (current
year). I agree that defaulting the month to the current month in the dot
format makes no sense, but I think (and I guess we disagree here) that
it's a matter of garbage in - garbage out. As for turning that garbage
into marbles: 32.3. == 1.4. seems more logical to me. Note that for example

2020.9.11 -> 2020-11-09 07:06:16 +0000

which means that we *never* parse the Chinese yyyy.mm.dd correctly, not
even the complete form!

Michael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help