#webliberty::Date.pm (2006/02/18) #Copyright(C) 2002-2006 Knight, All rights reserved. package webliberty::Date; use strict; ### コンストラクタ sub new { my $class = shift; my $self = { }; bless $self, $class; return $self; } ### 曜日取得 sub get_week { my $self = shift; my($year, $month, $day) = @_; if ($month == 1 or $month == 2) { $year--; $month += 12; } return int($year + int($year / 4) - int($year / 100) + int($year / 400) + int ((13 * $month + 8) / 5) + $day) % 7; } 1;