summaryrefslogtreecommitdiffstats
path: root/bin/date/vary.c
Commit message (Collapse)AuthorAgeFilesLines
* Change the behaviour of `-v' so that, e.g., stepping a month backyar2004-08-091-0/+7
| | | | | | | | | | | | | | | | | on March 31 won't take you to March 2 or 3 (now the result will be the last day of February.) In general, now stepping by months from the last days of the current month A will take you to the very last day of the target month B if B is shorter than A. The previous version would just step to March 31 and rely on mktime(3) to correct the date. Despite its simplicity, such way was counter-intuitive to users and caused pain to shell script writers. Noticed by: Igor Timkin <ivt at gamma dot ru> Approved by: brian MFC after: 2 weeks
* Consistently use __FBSDIDobrien2002-06-301-5/+2
|
* Fix warnings inspired by lint, a commercial lint and WARNS=4.markm2002-02-221-6/+7
|
* Exit if malloc() returns NULLbrian2000-12-011-1/+3
| | | | Submitted by: Chris Faulhaber <jedgar@fxp.org>
* Propogate the ``call mktime'' flag from adjwday() down to adjday().brian2000-05-231-4/+4
| | | | Submitted by: Christian Weisgerber <naddy@mips.inka.de>
* Change -v so that variences in units of days or less are sensitive tobrian2000-04-121-64/+52
| | | | | | DST. Explain in more detail what date -v does when mixed with DST. Previous code suggested broken by: wollman
* Always give mktime a timeval with tm_isdst set to -1, otherwisebrian2000-04-051-64/+117
| | | | | | | | | | | | | | | | things get a bit out-of-phase when we step backwards 1 hour from between 0:00 and 1:00 on the first of the month following the transition into Summer time. This is probably actually a bug in mktime(). PR: 10963 If mktime() fails and 68 < year < 138, assume that the reason is because of Summer time and adjust up or down according to our adjusting context by one hour. This assumes that all DSTs are multiples of 1 hour. PR: 6223, 17750
* Re-add "May" to the list of dates supported.alfred2000-02-181-2/+2
| | | | Approved by: jkh
* $Id$ -> $FreeBSD$peter1999-08-271-1/+1
|
* First set of fixes to keep egcs happy. These include {} around singleimp1999-04-251-3/+5
| | | | | | | | | | statement if blocks[*] when the else could be ambiguous, not defaulting to int type and removal of some unused variables. [*] This is explicitly allowed by style(9) when the single statement spans more than one line. Reviewed by: obrien, chuckr
* Support seconds with -v.brian1999-03-091-1/+42
| | | | | PR: 6308 Submitted by: Max Euston <meuston@jmrodgers.com>
* Correct use of .Nm and other cosmetics. Add rcsid. Remove unused #inc.charnier1998-05-061-2/+5
|
* Add (BSD) copyright headers.brian1997-12-211-0/+28
|
* Change [-DMHW [+|-]val] to [-v [+|-]val[ymwdHM]]brian1997-08-091-83/+130
| | | | | Support Hours & Minutes Add -Wall to Makefile
* Add [-DWMY] flags for date adjustment.brian1997-08-041-0/+337
Discussed with: freebsd-hackers
OpenPOWER on IntegriCloud