File: f007.t

package info (click to toggle)
libdate-pcalc-perl 6.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 1,896 kB
  • ctags: 620
  • sloc: perl: 16,706; ansic: 3,083; sh: 14; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 517 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
#!perl -w

BEGIN { eval { require bytes; }; }
use strict;
no strict "vars";

use Date::Pcalc qw( Date_to_Days );

# ======================================================================
#   $days = Date_to_Days($year,$mm,$dd);
# ======================================================================

print "1..2\n";

$n = 1;
if (Date_to_Days(1964,1,3) == 716973)   {print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Date_to_Days(1995,11,18) == 728615) {print "ok $n\n";} else {print "not ok $n\n";}

__END__