aboutsummaryrefslogtreecommitdiff
path: root/man/date.1
diff options
context:
space:
mode:
Diffstat (limited to 'man/date.1')
-rw-r--r--man/date.1282
1 files changed, 282 insertions, 0 deletions
diff --git a/man/date.1 b/man/date.1
new file mode 100644
index 0000000..775bd51
--- /dev/null
+++ b/man/date.1
@@ -0,0 +1,282 @@
+.\" Adapted for BNU from the GNU Coreutils 9.11 manual page; see doc/README.md.
+.TH DATE "1" "2026-07-28" "BNU 9.11" "BNU Commands"
+.\" Define monospaced roman font for groff in troff mode.
+.if t .if \n(.g \{\
+. ds mono \f(CR
+. ds /mono \fP
+.\}
+.SH NAME
+date \- print or set the system date and time
+.SH SYNOPSIS
+.B date
+[\fI\,OPTION\/\fR]... [\fB+\fR\fI\,FORMAT\/\fR]
+.br
+.B date
+[\fI\,OPTION\/\fR]... \
+\fIMMDDhhmm\/\fR[[\fI\,CC\/\fR]\fI\,YY\/\fR][\fB.\fI\,ss\/\fR]
+.SH DESCRIPTION
+.\" This page is derived from GNU Coreutils documentation.
+This page documents BNU, an independent Bun implementation compatible with
+GNU Coreutils 9.11.
+.PP
+Display date and time in the given FORMAT.
+With \fB\-s\fR, or with MMDDhhmm[[CC]YY][.ss], set the date and time first.
+.PP
+Mandatory arguments to long options are mandatory for short options too.
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-d'\fB\-d, \-\-date=\,STRING\fP\X'tty: link'\/\fR
+display time described by STRING, not 'now'
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date--debug'\fB\-\-debug\fP\X'tty: link'
+annotate the parsed date,
+and warn about questionable usage to standard error
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-f'\fB\-f, \-\-file=\,DATEFILE\fP\X'tty: link'\/\fR
+like \fB\-\-date\fR; once for each line of DATEFILE;
+if DATEFILE is \-, read names from standard input
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-I'\fB\-I[FMT], \-\-iso\-8601[=\,FMT]\fP\X'tty: link'\/\fR
+output date/time in ISO 8601 format.
+FMT='date' (default), 'hours', 'minutes', 'seconds', or 'ns'
+for date and time to the indicated precision.
+Example: 2006\-08\-14T02:34:56\-06:00
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date--resolution'\fB\-\-resolution\fP\X'tty: link'
+output the available resolution of timestamps.
+Example: 0.000000001
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-R'\fB\-R, \-\-rfc\-email\fP\X'tty: link'
+output date and time in RFC 5322 format.
+Example: Mon, 14 Aug 2006 02:34:56 +0000
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date--rfc-3339'\fB\-\-rfc\-3339=FMT\fP\X'tty: link'
+output date/time in RFC 3339 format.
+FMT='date', 'seconds', or 'ns'
+for date and time to the indicated precision.
+Example: 2006\-08\-14 02:34:56\-06:00
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-r'\fB\-r, \-\-reference=\,FILE\fP\X'tty: link'\/\fR
+display the last modification time of FILE
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-s'\fB\-s, \-\-set=\,STRING\fP\X'tty: link'\/\fR
+set time described by STRING
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#date-u'\fB\-u, \-\-utc, \-\-universal\fP\X'tty: link'
+print or set Coordinated Universal Time (UTC)
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/date#date--help'\fB\-\-help\fP\X'tty: link'
+display this help and exit
+.TP
+\X'tty: link https://www.gnu.org/software/coreutils/date#date--version'\fB\-\-version\fP\X'tty: link'
+output version information and exit
+.PP
+All options that specify the date to display are mutually exclusive.
+I.e.: \fB\-\-date\fR, \fB\-\-file\fR, \fB\-\-reference\fR, \fB\-\-resolution\fR.
+.PP
+FORMAT controls the output. Interpreted sequences are:
+.TP
+%%
+a literal %
+.TP
+%a
+locale's abbreviated weekday name (e.g., Sun)
+.TP
+%A
+locale's full weekday name (e.g., Sunday)
+.TP
+%b
+locale's abbreviated month name (e.g., Jan)
+.TP
+%B
+locale's full month name (e.g., January)
+.TP
+%c
+locale's date and time (e.g., Thu Mar 3 23:05:25 2005)
+.TP
+%C
+century; like %Y, except omit last two digits (e.g., 20)
+.TP
+%d
+day of month (e.g., 01)
+.TP
+%D
+date (ambiguous); same as %m/%d/%y
+.TP
+%e
+day of month, space padded; same as %_d
+.TP
+%F
+full date; like %+4Y\-%m\-%d
+.TP
+%g
+last two digits of year of ISO week number (ambiguous; 00\-99); see %G
+.TP
+%G
+year of ISO week number; normally useful only with %V
+.TP
+%h
+same as %b
+.TP
+%H
+hour (00..23)
+.TP
+%I
+hour (01..12)
+.TP
+%j
+day of year (001..366)
+.TP
+%k
+hour, space padded ( 0..23); same as %_H
+.TP
+%l
+hour, space padded ( 1..12); same as %_I
+.TP
+%m
+month (01..12)
+.TP
+%M
+minute (00..59)
+.TP
+%n
+a newline
+.TP
+%N
+nanoseconds (000000000..999999999)
+.TP
+%p
+locale's equivalent of either AM or PM; blank if not known
+.TP
+%P
+like %p, but lower case
+.TP
+%q
+quarter of year (1..4)
+.TP
+%r
+locale's 12\-hour clock time (e.g., 11:11:04 PM)
+.TP
+%R
+24\-hour hour and minute; same as %H:%M
+.TP
+%s
+seconds since the Epoch (1970\-01\-01 00:00 UTC)
+.TP
+%S
+second (00..60)
+.TP
+%t
+a tab
+.TP
+%T
+time; same as %H:%M:%S
+.TP
+%u
+day of week (1..7); 1 is Monday
+.TP
+%U
+week number of year, with Sunday as first day of week (00..53)
+.TP
+%V
+ISO week number, with Monday as first day of week (01..53)
+.TP
+%w
+day of week (0..6); 0 is Sunday
+.TP
+%W
+week number of year, with Monday as first day of week (00..53)
+.TP
+%x
+locale's date (can be ambiguous; e.g., 12/31/99)
+.TP
+%X
+locale's time representation (e.g., 23:13:48)
+.TP
+%y
+last two digits of year (ambiguous; 00..99)
+.TP
+%Y
+year
+.TP
+%z
++hhmm numeric time zone (e.g., \fB\-0400\fR)
+.TP
+%:z
++hh:mm numeric time zone (e.g., \fB\-04\fR:00)
+.TP
+%::z
++hh:mm:ss numeric time zone (e.g., \fB\-04\fR:00:00)
+.TP
+%:::z
+numeric time zone with : to necessary precision (e.g., \fB\-04\fR, +05:30)
+.TP
+%Z
+alphabetic time zone abbreviation (e.g., EDT)
+.PP
+By default, date pads numeric fields with zeroes.
+The following optional flags may follow '%':
+.TP
+\-
+(hyphen) do not pad the field
+.TP
+_
+(underscore) pad with spaces
+.TP
+0
+(zero) pad with zeros
+.TP
++
+pad with zeros, and put '+' before future years with >4 digits
+.TP
+^
+use upper case if possible
+.TP
+#
+use opposite case if possible
+.PP
+After any flags comes an optional field width, as a decimal number;
+then an optional modifier, which is either
+E to use the locale's alternate representations if available, or
+O to use the locale's alternate numeric symbols if available.
+.SH EXAMPLES
+Convert seconds since the Epoch (1970\-01\-01 UTC) to a date
+.IP
+\*[mono]$ date --date='@2147483647'\*[/mono]
+.PP
+Show the time on the west coast of the US (use \fBtzselect\fP(1) to find TZ)
+.IP
+\*[mono]$ TZ='America/Los_Angeles' date\*[/mono]
+.PP
+Show the local time for 9AM next Friday on the west coast of the US
+.IP
+\*[mono]$ date --date='TZ="America/Los_Angeles" 09:00 next Fri'\*[/mono]
+.SH "DATE STRING"
+.\" NOTE: keep this paragraph in sync with the one in touch.x
+The --date=STRING is a mostly free format human readable date string
+such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or
+even "next Thursday". A date string may contain items indicating
+calendar date, time of day, time zone, day of week, relative time,
+relative date, and numbers. An empty string indicates the beginning
+of the day. The date string format is more complex than is easily
+documented here but is fully described in the info documentation.
+.SH AUTHORS
+Upstream GNU Coreutils documentation authors:
+Written by David MacKenzie.
+.br
+Adapted for BNU; the BNU implementation is independent.
+.SH "REPORTING BUGS"
+Report BNU bugs at <https://github.com/Soccera1/bnu/issues>.
+.br
+For upstream GNU Coreutils, see <https://www.gnu.org/software/coreutils/>.
+.SH COPYRIGHT
+Copyright \(co 2026 Free Software Foundation, Inc.
+.br
+This manual page was adapted for BNU in 2026.
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
+.br
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+.SH "SEE ALSO"
+Upstream documentation <https://www.gnu.org/software/coreutils/date>
+.br
+BNU documentation is available locally via: info \(aq(bnu) date invocation\(aq