From cbff2a7bf264fbaa641ffceff5b10b1851c71802 Mon Sep 17 00:00:00 2001 From: Dianne Skoll Date: Thu, 27 Feb 2020 08:39:21 -0500 Subject: [PATCH] Document ampm() --- docs/WHATSNEW | 2 ++ man/remind.1 | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/docs/WHATSNEW b/docs/WHATSNEW index 69d0780f..d935e886 100644 --- a/docs/WHATSNEW +++ b/docs/WHATSNEW @@ -27,6 +27,8 @@ CHANGES TO REMIND - IMPROVEMENT: If terminal size can be determined, set $FormWidth to terminal width - 8; if not, set $FormWidth to 72. +- MINOR IMPROVEMENT: Add the "ampm()" built-in function. + * Version 3.3 Patch 0 - 2020-01-31 - FIX: rem2ps: Add a %%PageBoundingBox: document structuring convention diff --git a/man/remind.1 b/man/remind.1 index 16b2cab5..71585d82 100644 --- a/man/remind.1 +++ b/man/remind.1 @@ -2223,6 +2223,20 @@ is supplied, only the date component is used. Returns the time of "astronomical twilight" on the specified \fIdate\fR. If \fIdate\fR is omitted, defaults to \fBtoday()\fR. .TP +.B ampm(t_time [,s_am [,s_pm]]) +Returns a \fBSTRING\fR that is the result of converting \fItime\fR +to "AM/PM" format. The optional arguments \fIam\fR and \fIpm\fR are +the strings to append in the AM and PM case, respectively; they default +to "AM" and "PM". For example: +.RS +.PP +.nf + ampm(0:22) returns "12:22AM" + ampm(17:45, "am", "pm") returns "5:45pm" +.fi +.PP +.RE +.TP .B args(s_fname) Returns the number of arguments expected by the user-defined function \fIfname\fR, or \-1 if no such user-defined function exists. Note that