>>>>> "PB" == Pádraig Brady <[email protected]> writes: PB> %c '%a %x %X' locale's date and time
That's what I'm trying to avoid. I'm trying to see real samples, with no intellectual thinking involved. PB> %C 20 century; like %Y, except omit last two digits PB> %d 01 day of month PB> %D 12/31/99 date (ambiguous); same as %m/%d/%y PB> %e 1 day of month, space padded; same as %_d PB> %F 1999-12-31 full date; like %+4Y-%m-%d PB> %g 99 year of ISO week number (last two digits; 00-99); see %G PB> %G 1999 year of ISO week number; normally useful only with %V Also could you just use "now", a random date, not something specially tinkered so that it is a special date many years ago. PB> %N 123456789 nanoseconds (000000000..999999999) Yes, it is nice to know how many digits, but the example becomes less real. PB> %p PM locale's equivalent of AM or PM; blank if not known PB> %P pm like %p, but lower case PB> %q 4 quarter of year (1..4) PB> %r 1:11:04 PM locale's 12-hour clock time PB> %R 23:59 24-hour hour and minute; same as %H:%M PB> %s 1778169005 seconds since the Epoch (1970-01-01 00:00 UTC) PB> %S 59 second (00..60) PB> %t \t a tab Well that's tinkered too. I would write PB> %t "[<- there's a tab (\t) there.]" PB> %:z +04:00 +hh:mm numeric time zone PB> %::z +04:00:00 +hh:mm:ss numeric time zone PB> %:::z +04 numeric time zone to necessary precision; with : I'd put these in a separate section. After the straight alphabet part. And be sure to include the one liner script so people can do it themselves. And be sure it's a real one liner.
