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 37 38 39 40 41 42 43 44 45
|
#!perl -w
BEGIN { eval { require bytes; }; }
use strict;
no strict "vars";
eval { require Bit::Vector; };
if ($@)
{
print "1..0\n";
exit 0;
}
require Date::Calendar;
require Date::Calendar::Profiles;
Date::Calendar::Profiles->import('$Profiles');
# ======================================================================
# $cal = Date::Calendar->new($prof);
# $year = $cal->year($year);
# $year = Date::Calendar::Year->new($year,$prof); # (implicitly)
# ======================================================================
print "1..", scalar(keys %{$Profiles}), "\n";
$n = 1;
$year = 2000;
foreach $key (keys %{$Profiles})
{
eval
{
$cal = Date::Calendar->new( $Profiles->{$key} );
$year = $cal->year( $year );
};
unless ($@)
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
}
__END__
|