bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8357: coreutils bug in date


From: Bob Proulx
Subject: bug#8357: coreutils bug in date
Date: Tue, 29 Mar 2011 14:38:08 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Heikki Orsila wrote:
> Bob Proulx wrote:
> > 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)?

Something like that could be done.  I think there would be support for
that direction of development.

That is the problem when people put in features such as the relative
date calculations.  A simple but only partially implemented feature
sounds great but later causes an endless stream of problems.  They add
a partially nice feature but it isn't 100% perfect and then ten years
go by and people start to use it and then find the rough spots.  But
by then it is now a very long standing behavior and can't be changed.
Your suggestion to use different names avoids breaking the previous
behavior.  But still someone would need to actually do the work and
the code is not simple.  Working with human produced calender dates
has many traps and pitfalls.

Bob





reply via email to

[Prev in Thread] Current Thread [Next in Thread]