Hi, I need to find the number of days between two dates. The Perl Cookbook provides this solution:
use Date::Calc qw(Delta_Days); @bree = (1981, 6, 16); # 16 Jun 1981 @nat = (1973, 1, 18); # 18 Jan 1973 $difference = Delta_Days(@nat, @bree); But there's a hook: I need to calculate a room price based on the number of days, where a day costs $80 during summer (July 1 through September 15) and $55 otherwise (September 16 through June 30). Since people can book a room for any interval, I somehow have to integrate the dividing day and month values, something along the lines of if $mmdd > 0915 and $mmdd < 0630) ... in my calculation to allow for any combination of $80 and $55 days. Any hint on how to proceed from here? Thanks, Jan -- There's no place like ~/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>