Changeset 24480

Show
Ignore:
Timestamp:
11/20/08 18:15:07 (7 weeks ago)
Author:
daisuke
Message:

strftimeは外。

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

Legend:

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

    r24476 r24480  
    267267 
    268268    # We must short circuit for UTC times or else we could end up with 
    269     # loops between DateTime.pm and DateTime::TimeZone 
     269    # loops between DateTime.pm and DateTime::Lite::TimeZone 
    270270    if ( $self->{tz}->is_utc || $self->{tz}->is_floating ) 
    271271    { 
     
    382382} 
    383383 
     384sub offset                     { $_[0]->{tz}->offset_for_datetime( $_[0] ) } 
     385sub _offset_for_local_datetime { $_[0]->{tz}->offset_for_local_datetime( $_[0] ) } 
    384386 
    385387 
     
    544546} 
    545547 
     548sub week_year   { ($_[0]->week)[0] } 
     549sub week_number { ($_[0]->week)[1] } 
    546550 
    547551sub ymd 
     
    599603sub time_zone { $_[0]->{tz} } 
    600604 
    601 sub offset                     { $_[0]->{tz}->offset_for_datetime( $_[0] ) } 
    602 sub _offset_for_local_datetime { $_[0]->{tz}->offset_for_local_datetime( $_[0] ) } 
    603605 
    604606sub is_dst { $_[0]->{tz}->is_dst_for_datetime( $_[0] ) } 
     
    918920DateTime::Lite::TimeZone and DateTime::Lite::Locale have big changes from their original counterparts. 
    919921 
    920 First, you do NOT call new() on these objects (unless this is something you explicitly want to do). Instead, you need to call load(). So if you were mucking with DateTime::TimeZone and DateTime::Locale, you need to find out every occurance of 
    921  
    922     DateTime::TimeZone->new( name => 'Asia/Tokyo' ); 
     922First, you do NOT call new() on these objects (unless this is something you explicitly want to do). Instead, you need to call load(). So if you were mucking with DateTime::Lite::TimeZone and DateTime::Locale, you need to find out every occurance of 
     923 
     924    DateTime::Lite::TimeZone->load( name => 'Asia/Tokyo' ); 
    923925 
    924926and change them to 
  • lang/perl/DateTime-Lite/trunk/t/13strftime.t

    r24134 r24480  
    1414use Test::More tests => 134; 
    1515 
    16 use DateTime::Lite; 
     16use DateTime::Lite qw(Strftime); 
    1717 
    1818my $locale = 'en_US';