Helper function to format a 24-hour (00:00-23:59) time string in either
12-hour US format (e.g. "8:13pm") or keep it in 24-hour format (e.g.
"20:13") for any other locale or country.
The locale (and therefore default behavior) is derived from
options.location / options.locale. The options.hour12 override
takes precedence: if false, locale is ignored and the result is always
24-hour; if true, locale is ignored and the result is always 12-hour.
Parameters
timeStr: string
original time like "20:30"
suffix: string
"p" or "pm" or " P.M.". Add leading space if you want it
Helper function to format a 24-hour (00:00-23:59) time string in either 12-hour US format (e.g.
"8:13pm") or keep it in 24-hour format (e.g."20:13") for any other locale or country.The locale (and therefore default behavior) is derived from
options.location/options.locale. Theoptions.hour12override takes precedence: iffalse, locale is ignored and the result is always 24-hour; iftrue, locale is ignored and the result is always 12-hour.