Lines 29-35
sub filter {
Link Here
|
29 |
my ( $self, $text, $args, $config ) = @_; |
29 |
my ( $self, $text, $args, $config ) = @_; |
30 |
return "" unless $text; |
30 |
return "" unless $text; |
31 |
$config->{with_hours} //= 0; |
31 |
$config->{with_hours} //= 0; |
32 |
my $dt = dt_from_string( $text, 'iso' ); |
32 |
|
|
|
33 |
my $tz = DateTime::TimeZone->new(name => 'floating') unless $config->{with_hours}; |
34 |
my $dt = dt_from_string( $text, 'iso', $tz ); |
35 |
|
33 |
return $config->{as_due_date} ? |
36 |
return $config->{as_due_date} ? |
34 |
output_pref({ dt => $dt, as_due_date => 1 }) : |
37 |
output_pref({ dt => $dt, as_due_date => 1 }) : |
35 |
output_pref({ dt => $dt, dateonly => !$config->{with_hours} }); |
38 |
output_pref({ dt => $dt, dateonly => !$config->{with_hours} }); |
36 |
- |
|
|