Lines 3-9
use DateTime;
Link Here
|
3 |
use DateTime::TimeZone; |
3 |
use DateTime::TimeZone; |
4 |
|
4 |
|
5 |
use C4::Context; |
5 |
use C4::Context; |
6 |
use Test::More tests => 41; |
6 |
use Test::More tests => 42; |
7 |
use Test::MockModule; |
7 |
use Test::MockModule; |
8 |
use Time::HiRes qw/ gettimeofday /; |
8 |
use Time::HiRes qw/ gettimeofday /; |
9 |
|
9 |
|
Lines 159-161
$date_string = output_pref({ dt => $dt, dateformat => 'metric', timeformat => '2
Link Here
|
159 |
cmp_ok $date_string, 'eq', '11/12/2013 18:35', 'as_due_date with hours and timeformat 24hr (non-midnight time)'; |
159 |
cmp_ok $date_string, 'eq', '11/12/2013 18:35', 'as_due_date with hours and timeformat 24hr (non-midnight time)'; |
160 |
$date_string = output_pref({ dt => $dt, dateformat => 'us', timeformat => '12hr', as_due_date => 1 }); |
160 |
$date_string = output_pref({ dt => $dt, dateformat => 'us', timeformat => '12hr', as_due_date => 1 }); |
161 |
cmp_ok $date_string, 'eq', '12/11/2013 06:35 PM', 'as_due_date with hours and timeformat 12hr (non-midnight time)'; |
161 |
cmp_ok $date_string, 'eq', '12/11/2013 06:35 PM', 'as_due_date with hours and timeformat 12hr (non-midnight time)'; |
162 |
- |
162 |
|
|
|
163 |
my $now = DateTime->now; |
164 |
is( dt_from_string, $now, "Without parameter, dt_from_string should return today" ); |