bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #26361] NSCalendarDate %e format shows leading zeros


From: Doug Simons
Subject: [bug #26361] NSCalendarDate %e format shows leading zeros
Date: Mon, 27 Apr 2009 21:06:41 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1

Follow-up Comment #1, bug #26361 (project gnustep):

It looks like someone checked in my patch already, which is great. I just
realized that this isn't EXACTLY what Cocoa is doing, though. Apple's
implementation isn't including the leading space for days less than 10 -- they
just output the single digit. Their documentation is slightly ambiguous on
this: "same as %d but does not print the leading 0 for days 1 through 9". 

I think most implementations of the strftime() function that support %e
include a leading space before a single digit, so it's certainly a reasonable
way to go. I also plan to tweak this code to support a field width specifier
(which Cocoa supports), which will then allow a format of "%1d" (or "%1e") to
suppress the leading zero or space.

Nevertheless, I thought I'd let you all know that the current implementation
is still not quite in sync with Apple's, in case you prefer to go for 100%
compatibility with Cocoa rather than compatibility with the rest of the world.
:-)

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?26361>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]