#!/usr/bin/perl -Tw use strict; use Date::Format; use Date::Parse; my $time = str2time('2002-02-21'); my $day_of_wk = time2str("%w", $time); print "day of week is $day_of_wk\n"; $day_of_wk = time2str("%A", $time); print "day of week is $day_of_wk\n";