[WORKAROUND] Re: Getting an era's beginning date
[WORKAROUND] Re: Getting an era's beginning date
- Subject: [WORKAROUND] Re: Getting an era's beginning date
- From: Nick Zitzmann <email@hidden>
- Date: Mon, 28 Jan 2008 18:54:43 -0700
On Jan 28, 2008 AD, at 5:39 PM, 慧 松本 wrote:
I don't think it is realistic for NSCalendar to have Japanese era
database.
I'm pretty sure it does, since the names of the eras come from
somewhere. If, for example, you set your system clock to some time in
1870 and turn on the Japanese calendar in the International preference
pane, then the year & era will be "3 Meiji" instead of 1870. I was
trying to figure out where these eras started so I didn't have to poll
the system for the data.
But it doesn't matter too much, since I was able to work around the
problem by using -[NSDateFormatter eraSymbols], where the symbol
indexes are a perfect match for the era numbers on the Japanese
calendar. I was hoping it would be possible to not make this
assumption, but at least it solves the problem for now...
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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