nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] AM/PM

2012-11-10 00:14:12

 > >Or maybe somebody's already generating AM/PM format using the existing
 > >formation functions!?
 > 
 > And .... you can!
 > 
 > %(hour12) = %(void(hour{date}))%(modulo 12)
 > 
 > %(ampm) = %(void(hour{date}))%<(gt 11)PM%|AM%>
 > 
 > Replace 'date' with your component of choice.

Super mh-format-fu!  

er, 00:09am?
only works right for 23 of 24 hours?
can you add if hour == 0 then hour = 12?
my perl code had the same bug.

steve
--

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>