Berkeley CSUA MOTD:Entry 46061
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/09 [General] UID:1000 Activity:popular
7/9     

2007/3/22-24 [Computer/SW/Languages/C_Cplusplus] UID:46061 Activity:low Cat_by:auto
3/22    How do I use strftime (or something else) to print the date in
        locale format, except using YYYY instead of YY as year? %x
        gives "11/17/05", I want "11/17/2005". Thanks!
        \_ did you try %Ex or %EX?
           \_ did you?
              \_ no, but I was too lazy to write a test program. I
                 figured op was in a better position to try it and
                 see.
                 \_ It doesn't work on Windows, and no difference
                    on Linux. -op
        \_ Unless you redefine your locale, you don't.