Synopsis: date(1) doesn't show the number of the last day of the year Responsible-Changed-From-To: freebsd-bugs->brian Responsible-Changed-By: brian Responsible-Changed-When: Thu Jun 3 08:14:47 UTC 2010 Responsible-Changed-Why: I wrote this code...
The -v switch in date(1) is intended to work this way; it applies the adjustments in order. So, while 'date -v31d -v12m' won't work when the current month has less than 31 days, 'date -v12m -v31d' will always work. The rationalle behind this is that because adjustments may be relative rather than absolute (or may even be a mixture), they must be applied in order. For example, to find the last day of February, 2012 you can use 'date -v1d -v3m -v2012y -v-1d +%d', and the arguments are not commutitive. http://www.freebsd.org/cgi/query-pr.cgi?pr=147354 _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"