Don't understand NSDateFormatter
Don't understand NSDateFormatter
- Subject: Don't understand NSDateFormatter
- From: kubernan <email@hidden>
- Date: Thu, 18 Jul 2002 22:06:14 +0200
Hello,
After reading the archive mailing list and doing some researches in
sample codes
i'm always in the dark with NSDateFormatter :
I have a matrix of text fields, some of them let's user type a date in
natural language.
In my first attempt to understand NSDateFormatter i did this :
NSDateFormatter *aDateF = [[NSDateFormatter alloc]
initWithDateFormat:@"%m %d %Y" allowNaturalLanguage:TRUE];
I attached this new formatter to my first text field cell. It appears i
can *only* type number and immedialty
after entered a number i have a full MM JJ AAAA string representation in
the field. Ex :
Enter number 1 --> 07 01 2002 is displayed
Enter number 2 --> 07 02 2002 is diplayed
Enter number 3 --> 07 03 2002 is displayed .... and so on.
And if i delete the century using backspace the entire field becomes
blank...
What i'd like to do is to enter natural language date such as 'tomorrow'
'yesterday' 'a month ago' ...
I don't understand the allowNaturalLanguage: association with the
initWithDateFormat:
i think it's a stupid question but : why set up the bool flag to YES if
we specify a format ?
Thx a lot for your help,
K.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.