Lines 29-35
cmp_ok $date_string, 'eq', '2011-06-16 12:00', 'iso output';
Link Here
|
29 |
$date_string = output_pref( $dt, 'iso', '12hr' ); |
29 |
$date_string = output_pref( $dt, 'iso', '12hr' ); |
30 |
cmp_ok $date_string, 'eq', '2011-06-16 12:00 PM', 'iso output 12hr'; |
30 |
cmp_ok $date_string, 'eq', '2011-06-16 12:00 PM', 'iso output 12hr'; |
31 |
|
31 |
|
32 |
$date_string = output_pref( $dt, 'iso', undef, 1 ); |
32 |
# "notime" doesn't actually mean anything in this context, but we |
|
|
33 |
# can't pass undef or output_pref will try to access the database |
34 |
$date_string = output_pref( $dt, 'iso', 'notime', 1 ); |
33 |
cmp_ok $date_string, 'eq', '2011-06-16', 'iso output (date only)'; |
35 |
cmp_ok $date_string, 'eq', '2011-06-16', 'iso output (date only)'; |
34 |
|
36 |
|
35 |
$date_string = output_pref( $dt, 'us', '24hr' ); |
37 |
$date_string = output_pref( $dt, 'us', '24hr' ); |
Lines 38-51
cmp_ok $date_string, 'eq', '06/16/2011 12:00', 'us output';
Link Here
|
38 |
$date_string = output_pref( $dt, 'us', '12hr' ); |
40 |
$date_string = output_pref( $dt, 'us', '12hr' ); |
39 |
cmp_ok $date_string, 'eq', '06/16/2011 12:00 PM', 'us output 12hr'; |
41 |
cmp_ok $date_string, 'eq', '06/16/2011 12:00 PM', 'us output 12hr'; |
40 |
|
42 |
|
41 |
$date_string = output_pref( $dt, 'us', undef, 1 ); |
43 |
$date_string = output_pref( $dt, 'us', 'notime', 1 ); |
42 |
cmp_ok $date_string, 'eq', '06/16/2011', 'us output (date only)'; |
44 |
cmp_ok $date_string, 'eq', '06/16/2011', 'us output (date only)'; |
43 |
|
45 |
|
44 |
# metric should return the French Revolutionary Calendar Really |
46 |
# metric should return the French Revolutionary Calendar Really |
45 |
$date_string = output_pref( $dt, 'metric', '24hr' ); |
47 |
$date_string = output_pref( $dt, 'metric', '24hr' ); |
46 |
cmp_ok $date_string, 'eq', '16/06/2011 12:00', 'metric output'; |
48 |
cmp_ok $date_string, 'eq', '16/06/2011 12:00', 'metric output'; |
47 |
|
49 |
|
48 |
$date_string = output_pref( $dt, 'metric', undef, 1 ); |
50 |
$date_string = output_pref( $dt, 'metric', 'notime', 1 ); |
49 |
cmp_ok $date_string, 'eq', '16/06/2011', 'metric output (date only)'; |
51 |
cmp_ok $date_string, 'eq', '16/06/2011', 'metric output (date only)'; |
50 |
|
52 |
|
51 |
$date_string = output_pref_due( $dt, 'metric', '24hr' ); |
53 |
$date_string = output_pref_due( $dt, 'metric', '24hr' ); |
52 |
- |
|
|