From 9dcab3a30d499f6fed5db56e34636610366cff37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 21 Jun 2021 21:55:44 +0200 Subject: Implement selectable date formats for d --- g.tmac | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) (limited to 'g.tmac') 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 -- cgit v1.2.3