Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
Datepicker problem, set to NSGregorianCalendar but value send back is still NSBuddhis
Hi, I have phones that use the Buddhist Calendar, they are already in year 2555. I can set the format of the datepicker to show the GregorianCalendar date (2012) but the value that the datepicker returns is still 2555.
I know I can convert the date from 1 to another in the background, but i would prefer to let datepicker just return me the right date.
Hi, I have phones that use the Buddhist Calendar, they are already in year 2555. I can set the format of the datepicker to show the GregorianCalendar date (2012) but the value that the datepicker returns is still 2555.
I know I can convert the date from 1 to another in the background, but i would prefer to let datepicker just return me the right date.
Thanks Sascha
An NSdate object does not use a particular calendar. A date is a moment in time, expressed as a number of seconds since January 1, 2001 in GMT. You use a calendar object to interpret a date using a particular calendar.
So by setting up your date picker in Gregorian, it lets the user describe the date in terms of the Gregorian calendar, but then if you pass that date to another system method, that method will display the date using whatever calendar it is set up to use. If a user's calendar is the Buddhist calendar then the date will be displayed in the Buddhist calendar unless you create a date formatter using a different calendar object.
Regards,
Duncan C WareTo
Animated GIF created with Face Dancer, available for free in the app store.
Replies
New app - See screenshots and details at www.globaclock.com.
If you want to
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeYes.
What i did
NSLocale *uk = [[NSLocale alloc] initWithLocaleIdentifier:@"en_GB"];
NSCalendar *cal = [NSCalendar currentCalendar];
[cal setLocale:uk];
[uk release];
[myDatePicker setCalendar:cal];
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeBy the way, please use code tags. [CODE] [1/CODE] Without the 1.
New app - See screenshots and details at www.globaclock.com.
If you want to
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeThanks
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeSo by setting up your date picker in Gregorian, it lets the user describe the date in terms of the Gregorian calendar, but then if you pass that date to another system method, that method will display the date using whatever calendar it is set up to use. If a user's calendar is the Buddhist calendar then the date will be displayed in the Buddhist calendar unless you create a date formatter using a different calendar object.
Duncan C
WareTo
Animated GIF created with Face Dancer, available for free in the app store.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome