Can you help me set it up so it works in this new format? it always dies on the third entry because the day is 31 when the error says it can only be 1..29.05.05.06 09.03.04 31.02.04 15.01.04 16.01.04 15.01.04 01.01.04 01.01.04 14.09.04 01.01.04 01.01.04 01.01.04 04.05.06 Day: 05 Month: 05 Year: 06 Day: 09 Month: 03 Year: 04 Software error: Day '31' out of range 1..29 at line 43
Thank you!
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); my $today = time; print "$today<br><br>"; foreach (keys %entries) { my ($date, $course, $location, $job_type, $contact) = split(/::/, $e +ntries{$_}); print "$date<br>"; } foreach (keys %entries) { my ($date, $course, $location, $job_type, $contact) = split(/::/, $e +ntries{$_}); my ($d,$m,$y) = split /\./, $date; my $saved_date = timelocal(0,0,0,$d,$m-1,$y); my $days_diff = int( ($today - $saved_date) / (24*60*60) ); print "Day: $d Month: $m Year: $y<br>"; }
In reply to Re: Re: Calculating between times
by Anonymous Monk
in thread Calculating between times
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |