Re: Date calculation

2004-04-23 Thread Chris Charley
- Original Message - From: "Jan Eden" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Chris Charley" <[EMAIL PROTECTED]>; "Perl Lists" <[EMAIL PROTECTED]> Sent: Thursday, April 22, 2004 3:56 AM Subject: Re: Date calculation Hi Chr

RE: Date calculation

2004-04-22 Thread Jan Eden
Hi Joel, - Original Message - From: Stout, Joel R Sent: 21.04.2004, 17:46 Uhr >Call me crazy but I have visions of people asking for Winter >discounts or various future changes (prolonged Summer rates?). What >of a simple text file that contains: > > >0914|80 >0915|80 >0916|55 >0917|

Re: Date calculation

2004-04-22 Thread Jan Eden
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

Re: Date calculation

2004-04-21 Thread Jan Eden
- Original Message - From: WC -Sx- Jones Sent: 21.04.2004, 14:23 Uhr >Jan Eden wrote: > >> if (season($start_date) && season($end_date) { >> $season_days = Delta_Days($start_date, $end_date) >> } elsif season($start_date) { > > >try not to make it *more* complicated :) > >You posted y

Re: Date calculation

2004-04-21 Thread Chris Charley
- Original Message - From: "Chris Charley" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: <[EMAIL PROTECTED]> Sent: Wednesday, April 21, 2004 6:48 PM Subject: Re: Date calculation > > - Original Message - > From: "Jan Eden" <[EM

Re: Date calculation

2004-04-21 Thread Chris Charley
- Original Message - From: "Jan Eden" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Perl Lists" <[EMAIL PROTECTED]> Sent: Wednesday, April 21, 2004 1:29 PM Subject: Date calculation Hi, I need to find the number of days between two dates. The Perl Cookbook provides this solution:

Re: Date calculation

2004-04-21 Thread WC -Sx- Jones
Jan Eden wrote: if (season($start_date) && season($end_date) { $season_days = Delta_Days($start_date, $end_date) } elsif season($start_date) { try not to make it *more* complicated :) You posted your own answer in the first post. Consider: ((season($start_date) && (season($end_date)) ?

Re: Date calculation

2004-04-21 Thread Jan Eden
- Original Message - From: WC -Sx- Jones Sent: 21.04.2004, 13:32 Uhr >Jan Eden wrote: >> if $mmdd > 0915 and $mmdd < 0630) ... >> >> in my calculation to allow for any combination of $80 and $55 days. > >(($mmdd > 0915) && ($mmdd < 0630)) ? $55 : $80; Thanks, I imagined a test like this

Re: Date calculation

2004-04-21 Thread WC -Sx- Jones
Jan Eden wrote: if $mmdd > 0915 and $mmdd < 0630) ... in my calculation to allow for any combination of $80 and $55 days. (($mmdd > 0915) && ($mmdd < 0630)) ? $55 : $80; -- _Sx_ http://youve-reached-the.endoftheinternet.org/ _ http://jaxpm.insecurity.org/ http://cis4dl.insecurity.or