File: 00_base.t

package info (click to toggle)
libclass-date-perl 1.1.10-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 192 kB
  • ctags: 99
  • sloc: perl: 669; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 376 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
print "1..6\n";

use Class::Date qw(now gmdate);
print "ok 1\n";

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

print "not " if ($t->year != 1980);
print "ok 2\n";

print "not " if ($t->hour);
print "ok 3\n";

print "not " if ($t->mon != 1);
print "ok 4\n";

print "not " unless now>"1970-1-1";
print "ok 5\n";

print "not " unless gmdate("now")>"1970-1-1";
print "ok 6\n";