dateutils
dateutils copied to clipboard
dgrep won't grep on weekday number within month (%c)
dateutils.dseq 2018-03-05 2018-05-15 -f '%F %a %c %u' | dateutils.dgrep '%c=04'
Expected output:
2018-03-22 Thu 04 04
2018-03-23 Fri 04 05
2018-03-24 Sat 04 06
2018-03-25 Sun 04 07
2018-03-26 Mon 04 01
2018-03-27 Tue 04 02
2018-03-28 Wed 04 03
2018-04-22 Sun 04 07
2018-04-23 Mon 04 01
2018-04-24 Tue 04 02
2018-04-25 Wed 04 03
2018-04-26 Thu 04 04
2018-04-27 Fri 04 05
2018-04-28 Sat 04 06
Actual output: nothing.
Grepping on %u
(the number of the weekday) works as expected, which I did just to be sure that I understood the command syntax correctly:
$ dateutils.dseq 2018-03-05 2018-05-15 -f '%F %a %c %u' | dateutils.dgrep '%u=04'
2018-03-08 Thu 02 04
2018-03-15 Thu 03 04
2018-03-22 Thu 04 04
2018-03-29 Thu 05 04
2018-04-05 Thu 01 04
2018-04-12 Thu 02 04
2018-04-19 Thu 03 04
2018-04-26 Thu 04 04
2018-05-03 Thu 01 04
2018-05-10 Thu 02 04
Version: 0.3.1 (latest)
OS: Ubuntu 16.04.1 LTS
Hey Mike, thanks for the report. A fix is in 91a5805f3.
I'm not quite sure if that applies to 0.3.1 though.