logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/
commit: 364aa7d79fa3fcd8f0506166383fd383b94c456c
parent 29a3265cc804f9d3e85b21ee51581ef43c60bc57
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 28 Apr 2025 17:34:28 +0200

lib/iso_parse.mdoc -> lib/datetime_parse.mdoc

Diffstat:

MMakefile4++--
Mcmd/date.1.in2+-
Mcmd/touch.1.in2+-
Alib/datetime_parse.mdoc60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dlib/iso_parse.mdoc60------------------------------------------------------------
5 files changed, 64 insertions(+), 64 deletions(-)

diff --git a/Makefile b/Makefile @@ -86,11 +86,11 @@ LIBUTILS_O = ${LIBUTILS_C:.c=.o} lib/utils.a: ${LIBUTILS_O} ${LIBUTILS_H} config.mk config.h Makefile ${AR} rc ${ARFLAGS} lib/utils.a ${LIBUTILS_O} -build/cmd/date.1: cmd/date.1.in lib/iso_parse.mdoc cmd/mkdir +build/cmd/date.1: cmd/date.1.in lib/datetime_parse.mdoc cmd/mkdir ./cmd/mkdir -p build/cmd $(M4) cmd/date.1.in > build/cmd/date.1 -build/cmd/touch.1: cmd/touch.1.in lib/iso_parse.mdoc cmd/mkdir +build/cmd/touch.1: cmd/touch.1.in lib/datetime_parse.mdoc cmd/mkdir ./cmd/mkdir -p build/cmd $(M4) cmd/touch.1.in > build/cmd/touch.1 diff --git a/cmd/date.1.in b/cmd/date.1.in @@ -36,7 +36,7 @@ will print the datetime in a user-defined way. Use .Ar datetime instead of current datetime. -include(lib/iso_parse.mdoc) +include(lib/datetime_parse.mdoc) .It Fl f Ar now_format Use .Ar now_format diff --git a/cmd/touch.1.in b/cmd/touch.1.in @@ -36,7 +36,7 @@ in 2011, in 2012. .\" Let's not publicly document too much that illumos still supports it .It Fl d Ar isotime -include(lib/iso_parse.mdoc) +include(lib/datetime_parse.mdoc) .It Fl h Do not follow symlinks. .It Fl m diff --git a/lib/datetime_parse.mdoc b/lib/datetime_parse.mdoc @@ -0,0 +1,59 @@ +.\" utils-std: Collection of commonly available Unix tools +.\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> +.\" SPDX-License-Identifier: MPL-2.0 +.\" +.\" Example: +.\" .Fl d Ar datetime +.\" .so lib/datetime_parse.mdoc +.\" +Should be formatted either with a leading @ (at) symbol followed by +the Unix timestamp (number of seconds before and after 1970-01-01 00:00:00Z), +for example +.Ql @1698791420 +corresponds to 2023-10-31 23:30:20 UTC +.Pp +Or as Email / "Internet Message Format" (RFC5322, RFC2822, RFC822), for example: +.Bl -bullet -compact +.It +.Ql Fri, 21 Nov 1997 09:55:06 -0600 +.It +.Ql 21 Nov 97 09:55:06 GMT +.El +.Pp +Or an +.Xr asctime 3 Ns -like +format, for example: +.Ql Sun Sep 16 01:03:52 1973 +.Pp +Or as RFC3339 which looks like +.Ql YYYY-MM-DDThh:mm:SS[frac][tz] , +where: +.Bl -tag -width Ds +.It Ql YYYY-MM-DD +Corresponds to %Y-%m-%d of +.Xr strptime 3 . +.It Ql T +Is either +.Ql T +or a space. +.It Ql [frac] +Is either empty, or fractional seconds starting with either a comma +.Pq \&, +or a period +.Pq \&. . +.It Ql [tz] +When empty it corresponds to local time. +Otherwise it can be an UTC offset in the format +.Ql [+-]HH:?MM +or the letter +.Qq Z , +signifying UTC. +.El +.Pp +Some examples: +.Bl -bullet -compact +.It +.Ql 2003-06-02T13:37:42.713Z +.It +.Ql 1971-01-02T03:04:05.678+0900 +.El +\ No newline at end of file diff --git a/lib/iso_parse.mdoc b/lib/iso_parse.mdoc @@ -1,59 +0,0 @@ -.\" utils-std: Collection of commonly available Unix tools -.\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> -.\" SPDX-License-Identifier: MPL-2.0 -.\" -.\" Example: -.\" .Fl d Ar datetime -.\" .so lib/iso_parse.mdoc -.\" -Should be formatted either with a leading @ (at) symbol followed by -the Unix timestamp (number of seconds before and after 1970-01-01 00:00:00Z), -for example -.Ql @1698791420 -corresponds to 2023-10-31 23:30:20 UTC -.Pp -Or as Email / "Internet Message Format" (RFC5322, RFC2822, RFC822), for example: -.Bl -bullet -compact -.It -.Ql Fri, 21 Nov 1997 09:55:06 -0600 -.It -.Ql 21 Nov 97 09:55:06 GMT -.El -.Pp -Or an -.Xr asctime 3 Ns -like -format, for example: -.Ql Sun Sep 16 01:03:52 1973 -.Pp -Or as RFC3339 which looks like -.Ql YYYY-MM-DDThh:mm:SS[frac][tz] , -where: -.Bl -tag -width Ds -.It Ql YYYY-MM-DD -Corresponds to %Y-%m-%d of -.Xr strptime 3 . -.It Ql T -Is either -.Ql T -or a space. -.It Ql [frac] -Is either empty, or fractional seconds starting with either a comma -.Pq \&, -or a period -.Pq \&. . -.It Ql [tz] -When empty it corresponds to local time. -Otherwise it can be an UTC offset in the format -.Ql [+-]HH:?MM -or the letter -.Qq Z , -signifying UTC. -.El -.Pp -Some examples: -.Bl -bullet -compact -.It -.Ql 2003-06-02T13:37:42.713Z -.It -.Ql 1971-01-02T03:04:05.678+0900 -.El -\ No newline at end of file