Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Date/Format/Generic.pm
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_P { lc($_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0]) }
sub format_P { lc($_[0]->format_p) }

sub format_d { sprintf("%02d",$_[0]->[3]) }
sub format_e { sprintf("%2d",$_[0]->[3]) }
Expand Down
12 changes: 11 additions & 1 deletion t/format.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use Test::More tests => 292;
use Test::More tests => 299;
use Date::Format qw(ctime time2str);
use Date::Language;
use utf8;
Expand Down Expand Up @@ -47,6 +47,7 @@ __DATA__
%M 02
%o 7th
%p PM
%P pm
%q 3
%r 01:02:42 PM
%R 13:02
Expand Down Expand Up @@ -325,3 +326,12 @@ Portuguese
%Oq III
%OY MCMXCIX
%Oy XCIX
936709362 # Tue Sep 7 13:02:42 1999 GMT (PM)
Dutch
%p NM
%P nm
%a di
%A dinsdag
1283926923 # Wed Sep 8 06:22:03 2010 GMT (AM)
%p VM
%P vm
Loading