aboutsummaryrefslogtreecommitdiff
path: root/g.tmac
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-06-21 21:55:44 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-06-21 21:55:44 +0200
commit9dcab3a30d499f6fed5db56e34636610366cff37 (patch)
tree1912a0184887824895a1ff64e5319dd824c2b587 /g.tmac
parentf945b570d86b09e77ecbceb9131e316c47ad5342 (diff)
downloadmk-9dcab3a30d499f6fed5db56e34636610366cff37.tar.gz
Implement selectable date formats for d
Diffstat (limited to 'g.tmac')
-rw-r--r--g.tmac37
1 files changed, 29 insertions, 8 deletions
diff --git a/g.tmac b/g.tmac
index 917a0ba..8475988 100644
--- a/g.tmac
+++ b/g.tmac
@@ -279,16 +279,37 @@ ___________________
.\" Environment macros -------------------------
.
.
-.\" d -- date
+.\" d -- centered date
.de d
. br
. @e d
-. af mo 00
-. af dy 00
-. ie '\$1'' \n[year]-\n(mo-\n(dy
-. el .if !'\$1'\&' \$1
-. af mo 1
-. af dy 1
+.
+. \" international format
+. ie '\$1'i' \{\
+. af mo 00
+. af dy 00
+\n[year]-\n(mo-\n(dy
+. af mo 1
+. af dy 1
+. \}
+.
+. \" english format
+. el .if '\$1'e' \{\
+\n(dy
+. ie \n(mo=1 January
+. el .ie \n(mo=2 February
+. el .ie \n(mo=3 March
+. el .ie \n(mo=4 April
+. el .ie \n(mo=5 May
+. el .ie \n(mo=6 June
+. el .ie \n(mo=7 July
+. el .ie \n(mo=8 August
+. el .ie \n(mo=9 September
+. el .ie \n(mo=10 October
+. el .ie \n(mo=11 November
+. el December
+\n[year]
+. \}
..
.\" h -- heading
.de h
@@ -317,7 +338,7 @@ ___________________
. @e s
..
.
-.\" t -- title
+.\" t -- centered title
.de t
. br
. @e t