Acme-Tools
view release on metacpan or search on metacpan
p=>'AM', #AM|PM upper (yes, opposite: date +%H%M%S%P%p)
P=>'am', #am|pm lower
S=>'SS',
t=>"\t",
T=>'HH24:MI:SS',
u=>'DoW', #day of week 1..7, 1=mon 7=sun
w=>'DoW0', #day of week 0..6, 1=mon 0=sun
#U=>'WoYs', #week num of year 00..53, sunday as first day of week
#V=>'UKE', #ISO week num of year 01..53, monday as first day of week
#W=>'WoYm', #week num of year 00..53, monday as first day of week, not ISO!
#x=>$ENV{locale's date representation}, #e.g. MM/DD/YY
#X=>$ENV{locale's time representation}, #e.g. HH/MI/SS
y=>'YY',
Y=>'YYYY',
#z=>'TZHHMI', #time zone hour minute e.g. -0430
#':z'=>'TZHH:MI',
#'::z'=>'TZHH:MI:SS',
#':::z'=>'TZ', #number of :'s necessary precision, e.g. -02 or +03:30
#Z=>'TZN', #e.g. CET, EDT, ...
);
my $pkeys=join"|",keys%p;
$format=~s,\%($pkeys),$p{$1},g;
( run in 1.353 second using v1.01-cache-2.11-cpan-ceb78f64989 )