diff options
author | Brian Somers <brian@FreeBSD.org> | 1997-08-10 16:36:59 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 1997-08-10 16:36:59 +0000 |
commit | 86a3e2a13a89ad22b4982c61a7b45b8720da5cd8 (patch) | |
tree | 2393301e73a7707fb5a198718c987625094bca83 /bin/date/date.1 | |
parent | 16e2a68bff4a853c36f17fbb2a6ef1102af5dcaf (diff) | |
download | src-86a3e2a13a89ad22b4982c61a7b45b8720da5cd8.tar.gz src-86a3e2a13a89ad22b4982c61a7b45b8720da5cd8.zip |
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.
Notes
Notes:
svn path=/head/; revision=28037
Diffstat (limited to 'bin/date/date.1')
-rw-r--r-- | bin/date/date.1 | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/bin/date/date.1 b/bin/date/date.1 index f14009a748ef..6a68518984a3 100644 --- a/bin/date/date.1 +++ b/bin/date/date.1 @@ -33,7 +33,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)date.1 8.3 (Berkeley) 4/28/95 -.\" $Id: date.1,v 1.13 1997/08/04 03:37:05 brian Exp $ +.\" $Id: date.1,v 1.14 1997/08/09 22:34:03 brian Exp $ .\" .Dd November 17, 1993 .Dt DATE 1 @@ -50,7 +50,7 @@ .Op Cm + Ns Ar format .Op Fl v Ar [+|-]val[ymwdHM] .Ar ... -.Op [[[[yy]mm]dd]HH]MM[\&.ss] +.Op Fl f Ar fmt Ar date | [[[[yy]mm]dd]HH]MM[\&.ss] .Sh DESCRIPTION .Nm displays the current date and time when invoked without arguments. @@ -69,6 +69,14 @@ to .Xr gettimeofday 2 will return a non-zero .Ql tz_dsttime . +.It Fl f +Use +.Ar fmt +as the format string to parse the date provided rather than using +the default +.Ar [[[[yy]mm]dd]HH]MM[.ss] +format. Parsing is done using +.Xr strptime 3 . .It Fl n The utility .Xr timed 8 @@ -160,9 +168,9 @@ Numeric month. A number from 1 to 12. .It Ar dd Day, a number from 1 to 31. -.It Ar hh +.It Ar HH Hour, a number from 0 to 23. -.It Ar mm +.It Ar MM Minutes, a number from 0 to 59. .It Ar .ss Seconds, a number from 0 to 61 (59 plus a maximum of two leap seconds). @@ -255,6 +263,7 @@ A record of the user setting the time. .Sh SEE ALSO .Xr gettimeofday 2 , .Xr strftime 3 , +.Xr strptime 3 , .Xr utmp 5 , .Xr timed 8 .Rs |