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 hibernate @any-related annotations?

using mvc, should hoop communication between views? between models?