| JackFrost | https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=3e2921d | 03:32 |
|---|---|---|
| LeePen | JackFrost: nice! | 08:32 |
| joerg | crossposting from #gnu (sorry for that, but maybe somebody here got an idea how to proceed) | 21:30 |
| joerg | <joerg> Sorry I don't see how to open a ticket on git://git.sv.gnu.org/coreutils.git , so... https://github.com/coreutils/gnulib/blob/master/doc/parse-datetime.texi#L364 needs rephrasing to represent the actual behavior of date(1) which is absolutely fine. "next _day_" picks a day between _now_+1d and _now_+7d, while "[this] _day_" picks a day between _now_ and _now_+6d | 21:30 |
| joerg | no idea how to phrase this so it helps for the average user | 21:31 |
| joerg | for when in today tomorrow; do date -d "$(date -d "$when" +%a) 1:00";date -d "next $(date -d "$when" +%a) 1:00";done ;-) "next day" does NOT >>move one week before or after the day that day by itself would represent<<, instead it just skips the >>(only if necessary)<< in >>The explicit mention of a day of the week will forward the date (only if necessary) to reach that day of the week in the future. << and actually starts searching tomorrow instead of | 21:32 |
| joerg | today | 21:32 |
| joerg | https://termbin.com/rgwo | 21:34 |
| joerg | cmd: date -d 'sun' >Sun Jan 1 00:00:00 CET 2023 | 21:37 |
| joerg | cmd: date -d 'next sun' >Sun Jan 8 00:00:00 CET 2023 | 21:38 |
| joerg | BUT: | 21:38 |
| joerg | cmd: date -d 'mon' >Mon Jan 2 00:00:00 CET 2023 | 21:38 |
| joerg | cmd: date -d 'next mon' >Mon Jan 2 00:00:00 CET 2023 | 21:38 |
| joerg | this is fine, just the https://www.gnu.org/software/coreutils/manual/html_node/Day-of-week-items.html "info page" is completely missleading and as I read it, incorrect | 21:40 |
| rwp | joerg, To file a bug ticket with GNU Coreutils send an email to bug-coreutils AT gnu.org (Ref: https://www.gnu.org/software/coreutils/) | 22:45 |
| joerg | rwp: thanks (actually I already found this, but felt very reluctant since I didn't know if they keep the sender email addr hidden, now I see there's an archive sp it's probably fine). Anyway, can you reproduce/confirm that the info page doesn't meet the actual behavior? | 22:58 |
| joerg | I feel like "can't be me being the only one who noticed this" | 22:59 |
| rwp | Because Coreutils is using an instance of the Debian BTS (https://debbugs.gnu.org/Packages.html) and that's email, the email is actually archived both in the BTS itself on debugs, and in the Mailman email archives on lists.gnu.org https://lists.gnu.org/archive/html/bug-coreutils/. | 23:21 |
| rwp | AFAIK the relative date engine either came directly out of cnews or was deeply influenced by it. And suffers due to the ad-hoc nature of it. | 23:22 |
| rwp | If it had been up to me relative date computation would have gone into a separate program not "date". | 23:22 |
| rwp | I referenced the GNU date FAQ entry in -offtopic and if you have improvements you would like to see there please let me know. | 23:24 |
| rwp | That one is mine. Eclectic as it is. The FAQ by its nature of referencing other discussion is a collection of tidbits rather than a cohesive tutorial. | 23:24 |
| rwp | I have generally avoided digging deep into the relative date engine, because I fear I would be spending a lot of time shouting at it, and it would be frustrating. | 23:26 |
| rwp | BBIAB, AFK | 23:26 |
Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!