Debian Codegraph @

t/dm5.date_delta_2a.t

raw symbols SCIP
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5 use Test::Inter;
6 $::ti = new Test::Inter $0;
7 require "tests-dm5.pl";
8
9 Date_Init("TZ=EST");
10 Date_Init(qw( PersonalCnf=Manip5.cnf PathSep=! PersonalCnfPath=./t!. IgnoreGlobalCnf=1 ));
11 Date_Init("WorkDayBeg=08:00","WorkDayEnd=17:00");
12
13 my $tests="
14
15 'Wed Nov 20 1996 noon' +0:5:0:0 2 => 1996112108:00:00
16
17 'Wed Nov 20 1996 noon' +0:2:0:0 2 => 1996112014:00:00
18
19 'Wed Nov 20 1996 noon' +3:2:0:0 2 => 1996112514:00:00
20
21 'Wed Nov 20 1996 noon' -3:2:0:0 2 => 1996111510:00:00
22
23 'Wed Nov 20 1996 noon' +3:7:0:0 2 => 1996112610:00:00
24
25 'Wed Nov 20 1996 noon' +6:2:0:0 2 => 1996112914:00:00
26
27 'Dec 31 1996 noon' +1:2:0:0 2 => 1997010214:00:00
28
29 'Dec 30 1996 noon' +1:2:0:0 2 => 1996123114:00:00
30
31 'Mar 31 1997 16:59:59' '+ 1 sec' 2 => 1997040108:00:00
32
33 'Wed Nov 20 1996 noon' +0:0:1:0:0:0:0 2 => 1996112712:00:00
34
35 2002120600:00:00 '- business 4 hours' 2 => 2002120513:00:00
36
37 2002120600:00:01 '- business 4 hours' 2 => 2002120513:00:00
38
39 2002120523:59:59 '- business 4 hours' 2 => 2002120513:00:00
40
41 2002120602:00:00 '- business 4 hours' 2 => 2002120513:00:00
42
43 2002120609:00:00 '- business 4 hours' 2 => 2002120514:00:00
44
45 2002120609:00:10 '- business 4 hours' 2 => 2002120514:00:10
46
47 2002120611:00:00 '- business 4 hours' 2 => 2002120516:00:00
48
49 2002120612:00:00 '- business 4 hours' 2 => 2002120608:00:00
50
51 2002120512:00:00 '+ business 4 hours' 2 => 2002120516:00:00
52
53 2002120514:00:00 '+ business 4 hours' 2 => 2002120609:00:00
54
55 2002120522:00:00 '+ business 4 hours' 2 => 2002120612:00:00
56
57 2002120523:59:59 '+ business 4 hours' 2 => 2002120612:00:00
58
59 2002120602:00:00 '+ business 4 hours' 2 => 2002120612:00:00
60
61 2002120609:00:00 '+ business 4 hours' 2 => 2002120613:00:00
62
63 20060616 '+1 business day' 2 => 2006061908:00:00
64 ";
65
66 $::ti->tests(func => \&DateCalc,
67 tests => $tests);
68 $::ti->done_testing();
69
70
71 #Local Variables:
72 #mode: cperl
73 #indent-tabs-mode: nil
74 #cperl-indent-level: 3
75 #cperl-continued-statement-offset: 2
76 #cperl-continued-brace-offset: 0
77 #cperl-brace-offset: 0
78 #cperl-brace-imaginary-offset: 0
79 #cperl-label-offset: 0
80 #End: