Commit Graph

70 Commits

Author SHA1 Message Date
Warner Losh
2c15efcfb5 Don't explicitly declare optarg and optind. These are declared in
unistd.h, which is already included.
2000-08-16 05:14:49 +00:00
John W. De Boskey
eba53b965a Try to clean the manpage up according to the mail from Sheldon
in committers (Message-Id: <72836.964344168@axl.ops.uunet.co.za>).

Also cleaned up a .Pq macro which was causing problems previous
to the original update I made.

Reviewed by:	sheldonh
Approved by:	jkh
2000-07-28 02:51:43 +00:00
John W. De Boskey
b4a3a03827 Expand the -r option to support hex. Though undocumented, the -r
option already supported octal. Add a comment to the -r option
in the man page so it's a bit more specific.

Discrepancy brought to my attention by: sasdrq@unx.sas.com
Approved by:	jkh
2000-07-22 22:08:39 +00:00
Sheldon Hearn
888d5fad11 Fix one grammar problem which crept in from rev 1.40 to rev 1.42, and
one mdoc problem from rev 1.40 (unnecessarily populated Nm macro).
2000-07-18 12:02:15 +00:00
Mark Ovens
e7b7b6e4c4 Re-worded the description of the -r option
PR:		18792
Submitted by:	Bob Johnson <bobj@atlantic.net>
Approved by:	Alexander Langer <alex@freebsd.org>
2000-07-15 14:55:54 +00:00
Alexander Langer
68dee1e331 Now, the mdoc fixes, such as:
* remove hard sentence breaks
* use of Fl with Ar if argument available
* Dq -> Sq where better
* Ql -> Dq and Ql -> Fa where better
* include sections to Xr macro
* It Ar .ss -> It Ar ss
2000-07-14 15:49:36 +00:00
Alexander Langer
60ad2ab574 As per request by sheldonh and others on IRC, seperate language and mdoc
fixes (very important in this case).  Version 1.40 should be discarded.

This version includes the language diffs.  To receive them, use
cvs diff [-u] -r 1.39 -r 1.41
2000-07-14 15:38:38 +00:00
Alexander Langer
8135b667d1 Fix several language, style and mdoc improvements (such as correct
usage of .Xr and removal of hard sentence breaks).

PR:		18880
Submitted by:	Christian Weisgerber <naddy@unix-ag.uni-kl.de>
Obtained from:	OpenBSD (in parts)
2000-07-14 14:18:04 +00:00
Mike Pritchard
af63ed3ce0 Grumble. The previous commit still had the wrong date in the
example.  Oct 29 0:30 +3 hours is still Oct 29, no matter what the
DST setting is, and not Oct 30..
2000-06-28 09:20:06 +00:00
Mike Pritchard
861c69ca3e Typo fix.
PR:		docs/19554
Submitted by:	Kazuo Horikawa <horikawa@psinet.com>
2000-06-28 09:13:32 +00:00
Brian Somers
714c609be5 Mention the timezone where appropriate (for the -v option).
correct one of the -v options.
2000-06-22 10:02:33 +00:00
Brian Somers
7ecff35b0d Propogate the ``call mktime'' flag from adjwday() down to adjday().
Submitted by: Christian Weisgerber <naddy@mips.inka.de>
2000-05-23 23:58:18 +00:00
Daniel Baker
d5dc63cc0a Correct confusion and differentiate appropriately between GMT and UTC when
date is launched with the "u" argument.  It now operates in the documented
manner.

Fix typo in date man page.

Submitted by:	David McNett <nugget@slacker.com>
2000-05-19 18:02:25 +00:00
Brian Somers
9263db41f6 Change -v so that variences in units of days or less are sensitive to
DST.  Explain in more detail what date -v does when mixed with DST.

Previous code suggested broken by: wollman
2000-04-12 13:35:17 +00:00
Brian Somers
a625bfec63 Always give mktime a timeval with tm_isdst set to -1, otherwise
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
2000-04-05 01:59:36 +00:00
Sheldon Hearn
8d230e25ae Correct confusing description of the -r option.
PR:		17250
Submitted by:	cjclark@home.com (Crist J. Clark)
2000-03-07 20:54:17 +00:00
Alfred Perlstein
3b006d8ebd Re-add "May" to the list of dates supported.
Approved by: jkh
2000-02-18 23:41:45 +00:00
Brian Somers
94a64a491a Fix various mandoc bugs 2000-01-12 00:29:16 +00:00
Sheldon Hearn
a82111c306 Back out previous commit and replace with a cleaner solution adapted
from the source attributed below.  In particular, this removes a goto
inside a switch and replaces those horrendous ATOI macros with
something acceptable.

More clean-ups to come.

PR:		bin/14151
Reported by:	Christian Weisgerber <naddy@mips.rhein-neckar.de>
Obtained from:	NetBSD
1999-12-29 16:50:08 +00:00
Sheldon Hearn
646e0924a1 Allow the year to be specified with an optional century.
PR:	14472
Reported by:	j_guojun@lbl.gov (Jin Guojun)
1999-11-10 13:34:39 +00:00
Peter Wemm
2a4562393f $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
Jordan K. Hubbard
9efde83904 Remove obsolete BUGS section which describes something which stopped
being relevant when we ripped out the BSD/VAX code.

Submitted by:	Guy Harris <gharris@flashcom.net>
1999-08-25 14:38:58 +00:00
Martin Cracauer
d430c0c167 Don't continue if parsing failed when -f is in use. Exit with nonzero value. 1999-06-25 09:04:48 +00:00
John-Mark Gurney
3bc1b1bb27 the month and three days are up for -hackers and the 24hrs for -committers.
add a -j flag that tells date not to try to set the date.  This allows you
to use date as a userland interface to strptime.

example:
TZ=GMT date -j -f "%a, %d %b %Y %T %Z" "Sun, 08 Nov 1998 02:22:20 GMT" +%s

which is the standard format for Last-modified headers in HTTP requests.

only one to respond: eivind
1999-05-14 00:28:41 +00:00
Kris Kennaway
46be34b902 Various spelling/formatting changes.
Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
1999-05-08 10:22:15 +00:00
Warner Losh
426e9c1dcc First set of fixes to keep egcs happy. These include {} around single
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
1999-04-25 21:13:34 +00:00
Brian Somers
269dfbee64 Support seconds with -v.
PR:		6308
Submitted by:	Max Euston <meuston@jmrodgers.com>
1999-03-09 09:38:54 +00:00
Daniel O'Callaghan
fd5a0a9b4b Example "19%y" changed to "%Y" to discourage poor usage. 1999-01-13 07:01:07 +00:00
Bruce Evans
d3f062f04e Don't put compiler warning flags in leaf Makefiles. 1998-12-07 12:50:48 +00:00
Alexander Langer
f97fe12243 Added missing #include <string.h> 1998-10-03 16:29:59 +00:00
Poul-Henning Kamp
84717b42e8 .Sh ENVIRONMENT VARIABLES -> .Sh ENVIRONMENT
PR:		6599
Reviewed by:	phk
Submitted by:	Josh Gilliam <josh@quick.net>
1998-05-13 07:57:49 +00:00
Philippe Charnier
574d120677 Restore Lite-2 sccsid. Restore include of sys/param.h. 1998-05-13 07:31:42 +00:00
Philippe Charnier
cbf6f7d358 Correct use of .Nm and other cosmetics. Add rcsid. Remove unused #inc. 1998-05-06 06:51:42 +00:00
Robert Nordier
336f22af33 Spelling/typo fixes: (preceeded, friday). 1998-04-20 21:06:38 +00:00
John Birrell
c1e8822ae4 Cast a size_t to a long to avoid a gcc warning. 1998-01-25 08:59:08 +00:00
Brian Somers
c39934ea32 Add (BSD) copyright headers. 1997-12-21 12:11:13 +00:00
Brian Somers
ad1c694bdc Put [+format] at the end of the usage message.
Make `date -?' output (pretty much) the same as
the man page
PR:		5269
1997-12-11 02:38:56 +00:00
Wolfram Schneider
f50f7e1e32 Change example from US to international standard date notation. 1997-10-03 18:09:17 +00:00
Daniel O'Callaghan
c5c1c13516 Back out suppress '\n' mod. 1997-10-03 12:54:30 +00:00
Daniel O'Callaghan
34de7199ea Add the '-s' flag to the usage string. 1997-10-01 05:44:35 +00:00
Daniel O'Callaghan
70a53cd743 Add the ability to supress the '\n' at the end of the date printed. 1997-10-01 05:24:08 +00:00
Joerg Wunsch
adb7f7bca7 Fix the broken `date HHMM.SS' handling.
PR:		bin/4661
Submitted by:	blank@sliphost37.uni-trier.de (Sascha Blank)
1997-09-30 20:06:15 +00:00
Wolfram Schneider
f6b31571f6 spelling corrections.
PR: docs/4450
Submitted by: josh@quick.net
1997-09-13 16:01:53 +00:00
John-Mark Gurney
81cd6abb0a fix misspelling
Submitted-by: Josh Gilliam

Closes PR:4425
1997-08-30 11:06:35 +00:00
Brian Somers
7fedb877a4 Hint at how to use TZ.
Submitted by:	grog@lemis.com
1997-08-18 20:27:17 +00:00
Brian Somers
233d16da02 Remove forgotten debug statement. 1997-08-10 16:37:33 +00:00
Brian Somers
86a3e2a13a Add "-f fmt date" for specification of the
date using strptime(3).
Suggested by: Michael Smith <msmith@atrad.adelaide.edu.au>

Change mm & dd to MM & DD so that they don't
clash with the month.
1997-08-10 16:36:59 +00:00
Brian Somers
698f86e401 Change [-DMHW [+|-]val] to [-v [+|-]val[ymwdHM]]
Support Hours & Minutes
Add -Wall to Makefile
1997-08-09 22:34:06 +00:00
Brian Somers
7ca215a690 Add [-DWMY] flags for date adjustment.
Discussed with: freebsd-hackers
1997-08-04 03:37:07 +00:00
Philippe Charnier
749d4bb649 Cosmetic change in usage string. 1997-06-06 06:40:06 +00:00