File: f011.t

package info (click to toggle)
libdate-calc-xs-perl 6.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 812 kB
  • sloc: perl: 7,397; ansic: 2,607; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 1,175 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!perl -w

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

use Date::Calc qw( Date_to_Text );

# ======================================================================
#   $datestr = Date_to_Text($year,$mm,$dd);
# ======================================================================

print "1..8\n";

$n = 1;
if (Date_to_Text(1964,1,3) eq "Fri 3-Jan-1964") {print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Date_to_Text(1995,11,18) eq "Sat 18-Nov-1995") {print "ok $n\n";} else {print "not ok $n\n";}
$n++;

if (Date_to_Text(1964,1,3,0) eq "Fri 3-Jan-1964") {print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Date_to_Text(1995,11,18,0) eq "Sat 18-Nov-1995") {print "ok $n\n";} else {print "not ok $n\n";}
$n++;

if (Date_to_Text(1964,1,3,1) eq "Fri 3-Jan-1964") {print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Date_to_Text(1995,11,18,1) eq "Sat 18-Nov-1995") {print "ok $n\n";} else {print "not ok $n\n";}
$n++;

if (Date_to_Text(1964,1,3,11) eq "per 3-tam-1964") {print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Date_to_Text(1995,11,18,11) eq "lau 18-mar-1995") {print "ok $n\n";} else {print "not ok $n\n";}
$n++;

__END__