Where is strftime(.....)?
Merlinus Ambrosius
edh at ux.acs.umn.edu
Sat Aug 11 07:59:21 AEST 1990
In the standard library in K&R (ANSI) on page 256 there is a very nice
looking procedure for formatting the current time into whatever form you
like. It doesn't seem to be present on this system, or on a local Sparc.
Anybody know where I can get this? What it does (according to the book)
is:
size_t strftime(char *s, size_t smax, const char *fmt, const struct tm *tp)
It formats date and time info from *tp into s according the fmt, using a
printf-like format. i.e. "%y%m%d %H%M%S" would put 900810 045835 into s.
This is similar to how "date" does it too, of course, but if something like
strftime already exists, I could sure use it!
All help is appreciated,
Eric Hendrickson
--
/---------"Oh carrots are divine, you get a dozen for dime, its maaaagic."---
|Eric (the "Mentat-Philosopher") Hendrickson Academic Computing Services
|edh at ux.acs.umn.edu The game is afoot! University of Minnesota
\----"What does 'masochist' and 'amnesia' mean? Beats me, I don't know."---
More information about the Comp.lang.c
mailing list