SciFi wrote: > I am just a passerby here. But when I see these specific > kinds of "errors", especially due to "month" usages, I always > have a thought: How would we make GNU-date to operate on the > Month Number Itself when we type "month" in the --date string, > and stop its assumption that we mean "30 days" by this usage? > We would not need to do this fooling-around with the Day-15 > trick as shown.
I understand the sentiment. My personal one is that the "human" language relative date code wasn't very well thought out and should not have been released in the present form. I also believe that behavior change in long standing code is to be avoided since it breaks so many things. However this one is trouble to use correctly though so I think changing it couldn't hurt too much. > I think this is where the "misusage" is being done by us > plain-ol' folk. ;) I think you are suggesting 2012-08-31 -1 month would end up with 2012-07-31, right? Makes sense to me. Hard to argue with it. Right up until 2012-08-31 -2 months comes along. Is that 2012-06-31? Or 2012-06-30 by force of will? Or 2012-07-01 by math? Or throw it as an invalid date? (Which I think would be less friendly.) Or? :-) It isn't a simple problem. It would be great if there were some really smart artificially intelligent program to process it. It would have to smarter than a human because even humans can't agree on this. > I hope I've expressed correctly what I mean with this thought. > (And I know: "Patches welcome." <g>) > Thanks for letting me interject my thought on this. I think it was a very good comment. Bob
