Hi Chris, ----- Original Message ----- From: Chris Charley Sent: 21.04.2004, 18:48 Uhr
>Hello Jan >Maybe something like this would do what you want :-) > >#!/usr/bin/perl >use strict; >use warnings; >use Date::Calc qw/Delta_Days Date_to_Days Add_Delta_Days/; > >my $beg = Date_to_Days(2004, 7, 1); >my $end = Date_to_Days(2004, 9, 15); > >my @chk_in = (2004, 6, 28); >my @chk_out = (2004, 7, 5); > >my $j = Delta_Days(@chk_in,@chk_out); > >for ( my $i = 0; $i <= $j; $i++ ){ > my @date = Add_Delta_Days(@chk_in,$i); > printf("%4d-%02d-%02d\t", @date); > my $day = Date_to_Days(@date); > print $day >= $beg && $day <= $end ? "\$80.00\n" : "\$55.00\n"; >} > >I took this example from Dtae::Calc man pages > - perldoc Date::Calc Thanks! That's exactly what I needed. Works perfectly - and if you need an apartment for rent at the Lago di Garda (Italy)... ;-) - Jan -- There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. - Jeremy S. Anderson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>