#!/usr/bin/perl #INPUT : 17 December 2001 to 16 June 2002 use strict; use Date::Calc qw( :all ); my ($fdate,$tdate,$day,$month,$year,$tday,$tmonth,$tyear,$i,$j,$hour); my (@start,@stop,@date); print "Enter the From Date: "; chomp($fdate = ); print "Enter the To Date: "; chomp($tdate = ); print "Enter the Total hours: "; chomp($hour = ); ($day,$month,$year)=split(" ", $fdate); ($tday,$tmonth,$tyear)=split(" ", $tdate); $month = Decode_Month($month); $tmonth = Decode_Month($tmonth); if (Date_to_Days($year,$month,$day) > Date_to_Days($tyear,$tmonth,$tday)) { print "\nThe From date should less than To Date\n"; } else { @start = ($year,$month,$day); @stop = ($tyear,$tmonth,$tday); $j = Delta_Days(@start,@stop); for ( $i = 0; $i <= $j; $i++ ) { @date = Add_Delta_Days(@start,$i); printf("%4d/%02d/%02d\n", @date); } }