| joerg | rwp: I think the code is absolutely fine. It's the infopage that is buggy | 00:16 |
|---|---|---|
| joerg | https://www.gnu.org/software/coreutils/manual/html_node/Day-of-week-items.html says >> In this context, ‘last day’ or ‘next day’ is also acceptable; they move one week before or after the day that day by itself would represent. << As I read that, my next two lines would yield different result, but actually they don't and that's what I expect and think is most plausible | 00:21 |
| joerg | cmd: date -d 'tue' >Tue Jan 3 00:00:00 CET 2023 | 00:21 |
| joerg | cmd: date -d 'next tue' >Tue Jan 3 00:00:00 CET 2023 | 00:21 |
| joerg | I'm happy with this. I'm NOT happy with >> In this context, ‘last day’ or ‘next day’ is also acceptable; they move one week before or after the day that day by itself would represent. << | 00:23 |
| joerg | this >>> https://github.com/coreutils/gnulib/blob/master/doc/parse-datetime.texi#L364 (plusminus ~10 lines context around there) is the line with the bug | 00:29 |
| joerg | I might even send a pullrequest/patch if I could come up with a better wording | 00:30 |
| rrq | what does "-d tue" do on a wednesday? | 00:33 |
| joerg | sth like "next tuesday is identical to %tuesday for all weekdays unless the weekday is today, in which case weekday" returns todays's date and next weekday is in 7 days" | 00:35 |
| joerg | rrq: it will return the date of next tuesday after today(wednesday) | 00:36 |
| joerg | like this: | 00:37 |
| joerg | cmd: date >Mon Jan 2 00:37:33 CET 2023 | 00:37 |
| joerg | cmd: date -d sun >Sun Jan 8 00:00:00 CET 2023 | 00:37 |
| joerg | but, the infopage is correct for today's weekday | 00:39 |
| joerg | cmd: date -d mon >Mon Jan 2 00:00:00 CET 2023 | 00:39 |
| joerg | cmd: date -d 'next mon' >Mon Jan 9 00:00:00 CET 2023 | 00:40 |
| joerg | not for any other weekday: | 00:41 |
| joerg | cmd: date -d 'next tue' >Tue Jan 3 00:00:00 CET 2023 | 00:41 |
| joerg | cmd: date -d 'tue' >Tue Jan 3 00:00:00 CET 2023 | 00:41 |
| rrq | yes, "next" seems to mean "the next such weekday after today" | 00:43 |
| joerg | and I think this is very much expected behavior, just the infopage is completely missing it | 00:44 |
| joerg | rrq: exactly | 00:44 |
| rrq | then "this %day" seems to mean "the %day of this week" ...which is sensitive to the timezone re weeks starting on sun or mon | 00:46 |
| rrq | or maybe it's just ".. of the week starting today"? | 00:50 |
| joerg | it's the 7 days starting today until today+6d | 00:51 |
| rrq | ok | 00:51 |
| joerg | while "next %day" means today+1d until today+7d | 00:51 |
| joerg | https://github.com/coreutils/gnulib/blob/master/doc/parse-datetime.texi#L364-L366 is wrong | 00:54 |
| rrq | right (I won't go to M$ hosts unneccesarily of course, but I trust you :) | 00:55 |
| joerg | :-D for you https://i.imgur.com/IjriGJz.jpg | 00:55 |
| Xenguy | Nice to see a principled man, people laugh at you nowadays instead : -/ | 00:56 |
| Xenguy | s/you/us | 00:57 |
| joerg | yeah, I support this principle. I as well don't like github exactly because M$ | 00:57 |
| joerg | here's the whole page in "compiled" form and not M$ server (I hope) https://www.gnu.org/software/coreutils/manual/html_node/Day-of-week-items.html | 01:00 |
| joerg | or in good ole' konqueror: info:/coreutils/Day of week items | 01:01 |
| rwp | "last" is the same as -1, "this" is the same as 0, "first" and "next" are both the same as +1 | 01:20 |
| rwp | In all honesty I have had conflict with people in English who use "next"... I'll say incorrectly. | 01:22 |
| rwp | They will use "next Friday" to mean the mean the Friday following the next Friday. | 01:22 |
| rwp | But for me next Friday is the next Friday that occurs. But to them they think next should skip one first. | 01:22 |
| Xenguy | Exactly | 01:25 |
| joerg | yes, and date(1) exactly follows this (I do too) https://termbin.com/z0hcw - just the infopage is written by somebody who a) doesn't know the code and behavior of date(1) and b) is a member of that group you had conflicts with | 01:25 |
| Xenguy | Why is that? I have no idea how that mistranslation could happen even | 01:25 |
| Xenguy | Next just means next | 01:26 |
| joerg | hehehe | 01:26 |
| Xenguy | It's not hard at all | 01:26 |
| rwp | I am sure marriages have ended over the use of "next" and whether one skips to the one after or not. | 01:27 |
| Xenguy | that and the dishes = ) | 01:27 |
| joerg | ...or never get accomplished ;-) | 01:27 |
| joerg | we're marrying NEXT saturday ;-P | 01:28 |
| Xenguy | He ghosted me!!! | 01:28 |
| Xenguy | WTF? | 01:28 |
| Xenguy | (Sorry for OT, ahem) | 01:28 |
| rwp | I think the usual idiom equivalent would be "Free beer tomorrow." It's never tomorrow and there is never free beer. | 01:29 |
| Xenguy | Tomorrow never knows | 01:30 |
| Xenguy | ^^ (Couldn't resist) | 01:30 |
| joerg | tomorrow is the question [quote of a graffiti on a berlin club wall] | 01:31 |
| Xenguy | That's just good graffiti | 01:32 |
| Xenguy | Like the poetry of the streets, or what have you | 01:32 |
| Xenguy | On the Road | 01:32 |
| rrq | in my memory "nästa fredag" (lit. "next Friday") does mean the Friday after the Friday coming up, except on Friday when it means the Friday coming up... different concept of "next".. | 01:35 |
| rrq | that's in Swedish, (if you must ask :) | 01:37 |
| rrq | .. and is no excuse for documenting the date command wrongly | 01:38 |
| joerg | different language different concept | 01:38 |
| joerg | actually that didn't occur to me. In english and german it's in line with the code of date(1) | 01:40 |
| joerg | to more important is a correct https://www.gnu.org/software/coreutils/manual/html_node/Day-of-week-items.html | 01:41 |
| joerg | correct like in "faithfully follows / describes behavior of the code" | 01:41 |
| * joerg ponders "meaning of NEXT depends on your LOCALE setting" and starts giggling | 01:43 | |
| rrq | of course... "próximo viernes" sounds like it could be where the swedes got their thinking from | 01:54 |
| rrq | as well as does "vendredi prochain" | 01:56 |
| rwp | One problem for that documentation is that there are several critical bits and pieces that all must be taken together but those parts are spread out over the different chapters. | 01:59 |
| joerg | I think it's exactly two lines of text, https://github.com/coreutils/gnulib/blob/master/doc/parse-datetime.texi#L364-L366 aka https://i.imgur.com/IjriGJz.jpg | 02:01 |
| joerg | the rest mostly seems correct, except https://github.com/coreutils/gnulib/blob/master/doc/parse-datetime.texi#L349 the part "(only if necessary) to reach that day of the week in the future." | 02:04 |
| onefang | Well for those of us living in Oz, Tomorrow is today. | 02:42 |
| Xenguy | That's not the trailing edge, but it could still be OK | 03:51 |
Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!