PDA

View Full Version : Date & Time: expert mode variables



rlwimi
6th June 2008, 10:13 AM
Since these weren't listed in the manual I thought I'd share the results of checking all the alpha characters. Specifically, these are what I found the character variables to map to in iStat 1.3 Date & Time, menubar clock, expert time format expression. If they are fully listed somewhere, maybe this is a good place to link from.

A: <long word day>
B: <long word month>
F: <microseconds> not functional with 1-second updates
H: <24-hour>
I: <2-digit month>
M: <minute>
S: <second>
X: <long word day>, <long word month> <day>, <year> <12-hour>:<minute>:<second> <AM/PM> <timezone>, same as c and x?
Y: <4-digit year>
Z: <timezone in words>
a: < short word day>
b: <short word month>
c: seems to be the same as X and x
d: <2-digit day>
e: <no lead zero day>
i: <2-digit month>
j: this has read 157 all day
m: <2-digit month>
p: <AM/PM>
w: this has read 4 all day
x: seems to be the same as X and c
y: <2-digit year>
z: <timezone in +/- hours>

Can anyone answer these questions. What is the difference between X, x, and c? What is the difference between i, I, and m? What in the world are j and w? Are there any others I missed?

iSlayer
6th June 2008, 10:17 AM
You can see a complete list here - Dates and Times Programming Topics for Cocoa: Converting Dates to Strings (http://developer.apple.com/documentation/Cocoa/Conceptual/DatesAndTimes/Articles/dtDatesToStrings.html#//apple_ref/doc/uid/20000187-BBCIECEH)



Can anyone answer these questions. What is the difference between X, x, and c? What is the difference between i, I, and m? What in the world are j and w? Are there any others I missed?

You should be able to see the differences between those in the document above.
And J is day of year and w is day of week

rlwimi
6th June 2008, 10:21 AM
Thanks!