strftime et al.
Moderator, John Quarterman
std-unix at ut-sally.UUCP
Thu Jan 8 09:20:22 AEST 1987
From: cbosgd!mark at seismo.css.gov (Mark Horton)
Date: Wed, 24 Dec 86 17:50:53 est
Organization: AT&T Medical Information Systems, Columbus
>`%y' and `%Y' are unnecessary. `%y' could push the year-with-century,
>and `%{100}' the value 100; invoking mod (`%%'? the name may prove
>problematical)
Terminfo uses %m for mod to get around the obvious problem of using
%% to get a literal %.
Chris makes a very good point. Another observation is that there
are lots of special pieces of the date you might want; rather than
giving them a separate letter each, you could group them as
parameters in a standard vector. Thus, %p1 might get the hours
rather than %H. If you like the mnemonics, %pH might be a
synonym. The idea here is that a vector is more easily extended,
and you don't have to be so careful about using up the space of
letters. This makes it easier to be printf-compatible.
Mark
Volume-Number: Volume 9, Number 4
More information about the Mod.std.unix
mailing list