Changeset 22

Show
Ignore:
Timestamp:
02/05/06 11:27:22
Author:
miyagawa
Message:

Added CustomFeed?::Mixi!
Plagger::Date->parse can now accept DT::Format object

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Date.pm

    r12 r22  
    99sub parse { 
    1010    my($class, $format, $date) = @_; 
    11     my $module = "DateTime::Format::$format"; 
    12     $module->require or die $@; 
     11 
     12    my $module; 
     13    if (ref $format) { 
     14        $module = $format; 
     15    } else { 
     16        $module = "DateTime::Format::$format"; 
     17        $module->require or die $@; 
     18    } 
     19 
    1320    my $dt = $module->parse_datetime($date); 
    14  
    1521    if (my $context = Plagger->context) { 
    1622        $dt->set_time_zone($context->conf->{timezone});