Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Perl Monk, Perl Meditation
 
PerlMonks  

Re: strftime reference

by bmann (Priest)
on Feb 24, 2005 at 18:40 UTC ( #434186=note: print w/ replies, xml ) Need Help??


in reply to strftime reference for Win32

holli++ - very useful

For the sake of completeness, here's sample output:

a: Day of Week (short, text) Thu A: Day of Week (long, text) Thursday b: Monthname (short, text) Feb B: Monthname (long, text) February c: Full datetime (number, long) 02/24/2005 12:53:26 PM d: Day (number) 24 H: Hour (24 hour) (number) 12 I: Hour (12 hour) (number) 12 j: Day of year (number) 055 m: Month (number) 02 M: Minutes (number) 53 p: am/pm/empty (text) PM S: Seconds (number) 26 U: Week of Year (number) 08 w: Day of week (number) 4 W: Week of Year (number) 08 x: date (number) 02/24/2005 X: time (number) 12:53:26 PM y: year (short, number) 05 Y: year (long, number) 2005 Z: timezone (text) Pacific Standard Time

Update: This is a Win2K system, Locale set to English(US)


Comment on Re: strftime reference
Download Code
Re^2: strftime reference
by holli (Monsignor) on Feb 24, 2005 at 18:44 UTC
    Yes, I did not think of that. Here is the output for a german system.
    a: Day of Week (short, text) Do A: Day of Week (long, text) Donnerstag b: Monthname (short, text) Feb B: Monthname (long, text) Februar c: Full datetime (number, long) 24.02.2005 19:42:04 d: Day (number) 24 H: Hour (24 hour) (number) 19 I: Hour (12 hour) (number) 07 j: Day of year (number) 055 m: Month (number) 02 M: Minutes (number) 42 p: am/pm/empty S: Seconds (number) 04 U: Week of Year (number) 08 w: Day of week (number) 4 W: Week of Year (number) 08 x: date (number) 24.02.2005 X: time (number) 19:42:04 y: year (short, number) 05 Y: year (long, number) 2005 Z: timezone (text) Westeuropäische Normalzeit

    As one can see, %p is empty here, because the locale is set to 24 hours. %x, %X and %c are different too.


    holli, /regexed monk/
Re^2: strftime reference
by Anonymous Monk on Jun 26, 2010 at 02:20 UTC
    Check out http://strfti.me for a very readable online reference and sandbox where you can experiment with different strftime format strings.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://434186]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2014-04-23 20:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (554 votes), past polls