Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!kth!draken!d88-jwa From: d88-jwa@nada.kth.se (Jon W{tte) Newsgroups: comp.lang.c Subject: Re: Dates & things in C Message-ID: <1157@draken.nada.kth.se> Date: 3 Jun 89 08:56:56 GMT References: <1128@draken.nada.kth.se> <1604@optilink.UUCP> Reply-To: d88-jwa@nada.kth.se (Jon W{tte) Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 37 In article <1604@optilink.UUCP> cramer@optilink.UUCP (Clayton Cramer) writes: >In article <1128@draken.nada.kth.se>, d88-jwa@nada.kth.se (Jon W{tte) writes: >> __ Jon W{tte (The dread Smiley Shark) email:h+@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+@nada.kth.se / \ (+46 (0) 8 258 268) /--- (c) 1989 Yessbox Allright Professional Products Inc. - Y.A.P.P.I. / -- No More --