
Hugh Redelmeier wrote:
| From: mwilson--- via talk <talk@gtalug.org> [ ... ]
I think that "next month" adds the length of the current month to the time. This is a 31-day month, we're quite late in it, so this hops over all of February.
That makes sense. They told me to ask for "next month", but what they give me is "one month from today". Because if all I wanted was $((`date +%m` % 12 + 1)) then why the heck didn't I say so? (Hat tip to Mike Galea there.) So I can fix up my scripts. I suppose "last month" doesn't hit this problem (have to try on March 1), and that finding the right year for "last month" and "next month" will be good -- since December and January are the same length. [ ... ]
The phony natural language that date accepts is a hazard.
Couldn't agree more, the state I'm in. Also pcal gags on some perfectly natural-looking directives. Many thanks, everybody.