***** infoCopter.com/perl *****

Theodor::Wagner

Calculates each weekday; based on Theodor Wagners modell «Ewiger Kalender»

CPAN

Usage

use Theodor::Wagner;

$tw = Theodor::Wagner->new();

($dd, $mm, $yyyy) = split /\./, $ARGV[0];

$weekday = $tw->weekday( D => $dd, M => $mm, Y => $yyyy );

print "weekday is $weekday\n";


Sample

% ./test-tw.pl "16.2.2002"
2/16/2002 - 20/02...
> 16 (dd) % 7 = 2
> [Table 1]  2 + 1 (h_month) = 3
> (02 * 1.25) % 7 = 2
> [Table 2]  2 (century2) + 2 (year2) = 4

weekday is Sa


[ Download ] - [ Inline as Sub Routine ]



The CGI Resource Index


[ Theodor Wagner ] - [ Theodor Wagner (2) ]

© reto :)