1#!/usr/bin/perl 2 3use warnings; 4use strict; 5use Test::Inter; 6$::ti = new Test::Inter $0; 7require "tests.pl"; 8 9our $dmt = new Date::Manip::TZ; 10our $obj = $dmt->base(); 11$dmt->config("forcedate","now,America/New_York"); 12 13sub test { 14 my(@test)=@_; 15 my @ret = $obj->day_of_year(@test); 16 return @ret; 17} 18 19my $tests=" 20 21[ 1999 1 1 ] => 1 22 23[ 1999 1 21 ] => 21 24 25[ 1999 3 1 ] => 60 26 27[ 2000 3 1 ] => 61 28 29[ 1980 2 29 ] => 60 30 31[ 1980 3 1 ] => 61 32 33 341999 1 => [ 1999 1 1 ] 35 361999 21 => [ 1999 1 21 ] 37 381999 60 => [ 1999 3 1 ] 39 402000 61 => [ 2000 3 1 ] 41 421980 60 => [ 1980 2 29 ] 43 441980 61 => [ 1980 3 1 ] 45 46"; 47 48$::ti->tests(func => \&test, 49 tests => $tests); 50$::ti->done_testing(); 51 52#Local Variables: 53#mode: cperl 54#indent-tabs-mode: nil 55#cperl-indent-level: 3 56#cperl-continued-statement-offset: 2 57#cperl-continued-brace-offset: 0 58#cperl-brace-offset: 0 59#cperl-brace-imaginary-offset: 0 60#cperl-label-offset: 0 61#End: 62