• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDateFormatter formats from NSLocale
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDateFormatter formats from NSLocale


  • Subject: Re: NSDateFormatter formats from NSLocale
  • From: Greg Guerin <email@hidden>
  • Date: Tue, 11 Aug 2009 14:40:21 -0700

Houdah - ML Pierre Bernard wrote:

NSMutableString *dateFormat = [NSMutableString stringWithString: [dateFormatter dateFormat]];

[dateFormat replaceOccurrencesOfString:@"d" withString:@"dd" options: 0 range:NSMakeRange(0, [dateFormat length])];


Unrestricted replacement of meta-characters doesn't handle quoted meta-characters in the formatting string. If you're going to do this task using meta-character replacement, you'll have to parse the entire format, correctly handling the quoted parts.

http://unicode.org/reports/tr35/tr35-6.html#Date_Format_Patterns

http://developer.apple.com/documentation/Cocoa/Conceptual/ DataFormatting/Articles/dfDateFormatting10_4.html#//apple_ref/doc/uid/ TP40002369

  -- GG

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Forcing a cell's field editor to send control:textShouldEndEditing: when leaving a cell
  • Next by Date: Re: "unlockFocus called too many time" console message
  • Previous by thread: Re: NSDateFormatter formats from NSLocale
  • Next by thread: UITabBarController Confusion
  • Index(es):
    • Date
    • Thread