On Tue, 20 Jan 2004 13:36:39 +0530 "Mallik" <[EMAIL PROTECTED]> wrote:
> Dear Friends, > > How to calculate the Day of the week for a given date > in PERL. > > Please provide me any code available that doesn't require > any other modules to be installed. Try this #!/usr/bin/perl -w @t = localtime; $y=$t[5]+1900; $m=sprintf("%0.2d",$t[4]+1); $d=sprintf("%0.2d",$t[3]); print "Day of week is $t[6]\tYYYYMMDD is $y$m$d\n"; #---------------------------------------------------------- -- Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>