GNU bug report logs -
#8357
Improve yesterday and tomorrow calculations for common cases
Previous Next
Full log
View this message in rfc822 format
On Sun, Mar 27, 2011 at 06:04:37PM -0600, Bob Proulx wrote:
> Thank you for your bug report. However I this is not a bug in date
> but a misunderstanding of how relative times and DST interact.
> ...
> The string `tomorrow' is worth one day in the future (equivalent to
> `day'), the string `yesterday' is worth one day in the past (equivalent
> to `day ago').
>
> So 'yesterday' or '24 hours ago' are equivalent. These are exactly 24
> hours ago or 86400 seconds. This is a critical point in your problem.
I see the problem, but IMO, the definition of yesterday should be changed
or there should be a new definition.
What about defining new units: 'calday', 'calyesterday', 'caltomorrow'?
For example, $(date -d '1 calday ago' '+%F')? These would count actual
calendar days rather than relative time (in units of 24 hours)?
Yes I know there is a work around in the doc you provided (thanks for that).
Heikki Orsila
This bug report was last modified 13 years and 325 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.