commit: 124625331c24c1134946aa6f1ddcfdbaca805907
parent: cc83f4744d3a8aee172d2449cbcec661e67d0b4c
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 11 Apr 2019 11:27:15 +0200
man1x/date.1x: Use option formatting instead of just braces
Diffstat:
M | man1x/date.1x | 106 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- |
1 file changed, 96 insertions(+), 10 deletions(-)
diff --git a/man1x/date.1x b/man1x/date.1x
@@ -35,24 +35,110 @@ BusyBox.
.Ss setdate format
The heck they managed to put in their manpage, followed by
.Xr strftime 3
-format with braces.
+format with reusing option formatting.
.Bl -tag
.It POSIX
-mmddhhmm[[cc]yy] which makes it %m%d%H%M[[%C]%y]
+.Sm off
+.Ar mmddhhmm
+.Oo
+.Ar cc
+.Op Ar yy
+.Oc
+.Sm on
+which makes it
+.Sm off
+.Ar %m%d%H%M
+.Oo
+.Ar %C
+.Op Ar %y
+.Oc
+.Sm on
.It Nx , Fx , Ox
-[[[[[CC]yy]mm]dd]HH]MM[.SS] which makes it [[[[[%C]%y]%m]%d]%H]%M[.%S]
+.Sm off
+.Oo Oo Oo Oo Oo
+.Ar CC Oc
+.Ar yy Oc
+.Ar mm Oc
+.Ar dd Oc
+.Ar HH Oc Ar MM Oo
+.Li \&. Ar SS Oc
+.Sm on
+which makes it
+.Sm off
+.Oo Oo Oo Oo Oo
+.Ar %C Oc
+.Ar %y Oc
+.Ar %m Oc
+.Ar %d Oc
+.Ar %H Oc Ar %M Oo
+.Li \&. Ar %S Oc
+.Sm on
.It GNU
-MMDDhhmm[[CC]YY][.ss] which makes it %m%d%H%M[[%C]%y][.%S]
+.Sm off
+.Ar MMDDhhmm
+.Oo
+.Ar CC
+.Op Ar YY
+.Oc
+.Op Ar .ss
+.Sm on
+which makes it
+.Sm off
+.Ar %m%d%H%M
+.Oo
+.Ar %C
+.Op Ar %y
+.Oc
+.Op Ar .%S
+.Sm on
.It BusyBox
Recognized formats:
-hh:mm[:ss]
-[YYYY.]MM.DD-hh:mm[:ss]
-YYYY-MM-DD hh:mm[:ss]
-[[[[[YY]YY]MM]DD]hh]mm[.ss]
+.Sm off
+.Bl -compact
+.It
+.Ar hh:mm
+.Op Ar :ss
+.It
+.Op Ar YYYY.
+.Ar MM.DD-hh:mm
+.Op Ar :ss
+.It
+.Sm on
+.Ar YYYY-MM-DD
+.Sm off
+.Ar hh:mm
+.Op Ar :ss
+.It
+.Oo Oo Oo Oo Oo
+.Ar YY Oc
+.Ar YY Oc
+.Ar MM Oc
+.Ar DD Oc
+.Ar hh Oc
+.Ar mm
+.Op Ar .ss
+.Sm on
+.El
.It At v6
-mmddhhmm[yy] which makes it %m%d%H%M[%y]
+.Sm off
+.Ar mmddhhmm
+.Op Ar yy
+.Sm on
+which makes it
+.Sm off
+.Ar %m%d%H%M
+.Op Ar %y
+.Sm on
.It At 10th , Bx 4.2
-yymmddhhmm[.ss] which makes it %y%m%d%H%M[.%S]
+.Sm off
+.Ar yymmddhhmm
+.Op Ar .ss
+.Sm on
+which makes it
+.Sm off
+.Ar %y%m%d%H%M
+.Op Ar .%S
+.Sm on
.Sh SOURCE
.Nx 8.0 ,
.Fx 12.0 ,