File: 00_base.t

package info (click to toggle)
libclass-date-perl 1.1.17-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 364 kB
  • sloc: perl: 922; xml: 273; makefile: 9
file content (20 lines) | stat: -rw-r--r-- 294 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use warnings;
use Test::More;

plan tests => 6;

use Class::Date qw(now gmdate);
ok(1);

my $t = gmdate(315532800); # 00:00:00 1/1/1980

is $t->year, 1980, 'year';

is $t->hour, 0, 'hour';

is $t->mon, 1, 'mon';

cmp_ok now, '>', "1970-1-1";

cmp_ok gmdate("now"), '>', "1970-1-1";