Date Formatter fun
Date Formatter fun
- Subject: Date Formatter fun
- From: Duncan Campbell <email@hidden>
- Date: Mon, 14 Feb 2005 13:39:01 +1100
Hey folks - i'm using a dateformatter to get a nice looking datetime:
[today descriptionWithCalendarFormat:@"%a %I:%M %p"]
however, I'm a little annoyed that the "hour" formatter (the %I) always gives the hour as a 2-digit - i.e. 9:45am will be formatted as 09:45am.
This IS as written in the docs, however I was wondering it there was a simple way to get a single-digit hour when appropriate, whilst still being about to use the descriptionWithCalendarFormat method?
My current method - to manually parse the date into day/hour/min/ampm vars - seems like such a lot of code for such a tiny issue...
Anyone any ideas?
Cheers.
---------------------------------------------------------------
Duncan Campbell
http://www.duncanandsarah.com/duncan
---------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden