date+
Section: Local Commands (L)
Updated: Oct. 1991
Index
Return to Main Contents
NAME
date+ - date formatter, with offsets
SYNOPSIS
date+
date_specification
format_specification
DESCRIPTION
date+
takes a date specifier, formats it per your specifications, and writes
the result to stdout.
date+
is similar to
date(1)
except that an arbitrary date can be specified (instead of today's date).
Further, the arbitrary date can include an offset, so that date arithmetic
can be performed.
ARGUMENTS
- date_specification
-
This string contains both the date and/or time values, and an optional
offset specifier. The format is that supported by
getdate
found in the Usenet news software.
If date is omitted, today's date is used. If the time is omitted, 00:00:00
is used. An offset is a number followed by a duration unit, chosen from
"year" through "second", and an optional "ago" to
indicate a negative offset is desired.
- format_specification
-
This string describes how the date is to be displayed, and is defined
by the
strftime(3)
subroutine man page.
AUTHOR
getdate.y
is by Steven M. Bellovin (unc!smb). The glue is by James Dugal (jpd@usl.edu).
BUGS
Maybe not really a bug, but it can be surprising: adding an offset that
crosses a daylight savings time change, can yield a result that differs
by one hour from what you'd expect. For example, "10/27/91 1 day" will
yield 10/27/91 with %D and 10/27/91 23:00:00 with %c. This is because
all offset values are converted into their seconds equivalent, and then
applied.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- ARGUMENTS
-
- AUTHOR
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 23:55:13 GMT, February 10, 2023