Changeset 24601

Show
Ignore:
Timestamp:
11/22/08 12:51:49 (5 years ago)
Author:
daisuke
Message:

fix default date/time format

Location:
lang/perl/DateTime-Lite/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/DateTime-Lite/trunk/lib/DateTime/Lite/Locale.pm

    r24599 r24601  
    5454    # key, it allows them to be settable. 
    5555    return bless { @_, 
    56         default_date_format_length => $class->_default_date_format_length(), 
    57         default_time_format_length => $class->_default_time_format_length(), 
     56        default_date_format_length => 'medium', 
     57        default_time_format_length => 'medium', 
    5858    }, $class; 
    5959} 
     
    6969    my $default = $_[0]->default_date_format_length(); 
    7070    if (! $default) { 
    71         die sprintf("DateTime::Lite::Locale %s did not return a proper value from default_date_format_length()", $_[0]->{name}); 
     71        die sprintf("DateTime::Lite::Locale %s did not return a proper value from default_date_format_length()", $_[0]->{id}); 
    7272    } 
    7373    my $meth = "date_format_$default"; 
     
    127127sub _available_formats { } 
    128128 
    129 sub default_date_format_length { $_[0]->{_default_date_format_length} } 
     129sub default_date_format_length { $_[0]->{default_date_format_length} } 
    130130 
    131131sub set_default_date_format_length 
     
    137137} 
    138138 
    139 sub default_time_format_length { $_[0]->{_default_time_format_length} } 
     139sub default_time_format_length { $_[0]->{default_time_format_length} } 
    140140 
    141141sub set_default_time_format_length 
     
    385385time_format_medium 
    386386time_format_short 
    387 _default_date_format_length 
    388 _default_time_format_length 
    389387_format_for_Hm 
    390388_format_for_M 
  • lang/perl/DateTime-Lite/trunk/t/13strftime.t

    r24480 r24601  
    3131    { 
    3232        $locale = $1; 
    33         eval "use DateTime::Lite::Locale::$1"; 
    34         die $@ if $@; 
    3533 
    3634        Test::More::diag("New locale: $locale\n");