Dates & things in C
Jon W{tte
d88-jwa at nada.kth.se
Sat Jun 3 18:56:56 AEST 1989
In article <1604 at optilink.UUCP> cramer at optilink.UUCP (Clayton Cramer) writes:
>In article <1128 at draken.nada.kth.se>, d88-jwa at nada.kth.se (Jon W{tte) writes:
>> __ Jon W{tte (The dread Smiley Shark) email:h+ at nada.kth.se
>Speaking of internationalization, what is the second character of
>your name? All I get is a left bracket.
It IS a left bracket! Or, if you are running on a machine with
Swedish ASCII font translation, its an a with two dots over it,
pronounced a bit like the E in WET (you know, not dry...)
> #ifdef AMERICA
> sprintf(Buffer, "%s-%02d-%02d", MonthStr, Date, Year);
> #else /* BENIGHTEDPARTSOFWORLD */
> sprintf(Buffer, "%02d-%s-%02d", Date, MonthStr, Year);
> #endif
Aheum... A good start, but a widely used date format is YY MM DD, that
is:
sprintf(Buffer, "%02d.%02d.%02d", Year, Month, Date);
Of course, any Real Programmer :-) defines a macro GimmeDaDateIn(Buffer)
that is selectively defined in the define part... Like you do in the
above example.
>Clayton E. Cramer {pyramid,pixar,tekbspa}!optilink!cramer
>"He chose...poorly." -- Indiana Jones & The Last Crusade
>----------------------------------------------------------------------------
>Disclaimer? You must be kidding! No company would hold opinions like mine!
Keep up the good work, Cramer!
--
__ Jon W{tte (The dread Smiley Shark) email:h+ at nada.kth.se
/ \ (+46 (0) 8 258 268)
/--- (c) 1989 Yessbox Allright Professional Products Inc. - Y.A.P.P.I.
/ -- No More --
More information about the Comp.lang.c
mailing list