(view source code of week.pl as plain text)
#! perl# Week.pl, Version 2.00# Display week number using Perl# Written by Rob van der Woude# http://www.robvanderwoude.com# Parse time string($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
# Calculate number of full weeks this year$week = int( ( $yday + 1 - $wday ) / 7 );
# Add 1 if today isn't Saturdayif ($wday < 6) {
$week = $week + 1
}# Display the resultprint "Week $week\n";
page last modified: 2025-10-11; loaded in 0.0071 seconds