X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Trace-PostClient-IP: 68.147.131.211 From: Brian Inglis Newsgroups: comp.os.msdos.djgpp Subject: C99 strftime() C locale defaults Organization: Systematic Software Message-ID: X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 55 Date: Mon, 15 Mar 2004 04:03:01 GMT NNTP-Posting-Host: 24.71.223.147 X-Complaints-To: abuse AT shaw DOT ca X-Trace: pd7tw3no 1079323381 24.71.223.147 (Sun, 14 Mar 2004 21:03:01 MST) NNTP-Posting-Date: Sun, 14 Mar 2004 21:03:01 MST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I'm in the process of updating DJGPP libc strftime() to properly support C99 formats and conversions for my own interest. I have a question about the C locale defaults in the final version of the C99 Standard. Can anyone tell me if the final C99 Standard specifies strftime() defaults for the C locale different from strftime() in the POSIX locale from the POSIX 2003 standard (which now has a back reference to the C Standard)? My copy of the official C99 Standard (and e-receipt) got blown away by a disk crash shortly after downloading, and I'm too superstitious and cheap to pay and download again, so I'm going from the final committee distribution C99 FDIS 1999-04 which gives the following as the strftime() C locale defaults: %a the first three characters of %A. %A one of "Sunday", "Monday", ... , "Saturday". %b the first three characters of %B. %B one of "January", "February", ... , "December". %c equivalent to "%A %B %d %T %Y". %p one of "am" or "pm". %r equivalent to "%I:%M:%S %p". %x equivalent to "%A %B %d %Y". %X equivalent to %T. %Z implementation-defined. The POSIX 2003 strftime() defaults are: http://www.opengroup.org/onlinepubs/007904975/functions/strftime.html %a The first three characters of %A . %A One of Sunday, Monday, ..., Saturday. %b The first three characters of %B . %B One of January, February, ..., December. %c Equivalent to %a %b %e %T %Y. %p One of AM or PM. %r Equivalent to %I:%M:%S %p. %x Equivalent to %m/%d/%y. %X Equivalent to %T. %Z Implementation-defined. The C locale defaults for %c, %p, %x differ between C99 FDIS and POSIX 2003: C99 FDIS POSIX 2003 %c %A %B %d %T %Y %a %b %e %T %Y %p am pm AM PM %x %A %B %d %Y %m/%d/%y Should the first column be used or the second column kept as the defaults? -- Thanks. Take care, Brian Inglis Calgary, Alberta, Canada Brian DOT Inglis AT CSi DOT com (Brian dot Inglis at SystematicSw dot ab dot ca) fake address use address above to reply