how tell user's controlling 24 hour controlling cocoa


i'm perplexing establish user controlling 24 hour 12 hour time, there doesn't seem good proceed figure out formulating an nsdateformatter poison format twine generation domain ('a' character)



here's i'm doing now:



nsdateformatter *formatter = [[nsdateformatter alloc] init];
[formatter settimestyle:nsdateformattershortstyle];
nsrange operation = [[formatter dateformat] rangeofstring:@"a"];
bool is24hourformat = range.location == nsnotfound && range.length == 0;
[formatter release];


which works, nonetheless feels kinda fragile. there improved way, right?



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members