FROM : Nick Zitzmann
DATE : Tue Jan 29 02:54:43 2008
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/>
DATE : Tue Jan 29 02:54:43 2008
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/>
| Related mails | Author | Date |
|---|---|---|
| Nick Zitzmann | Jan 29, 00:49 | |
| ? ?? | Jan 29, 01:39 | |
| Clark Cox | Jan 29, 01:45 | |
| Nick Zitzmann | Jan 29, 02:54 | |
| Christopher Nebel | Jan 29, 05:11 | |
| Nick Zitzmann | Jan 29, 05:31 | |
| ? ?? | Jan 29, 06:01 | |
| Christopher Nebel | Jan 29, 22:17 | |
| Chris Kane | Feb 1, 19:41 |






Cocoa mail archive

