data67 has asked for the wisdom of the Perl Monks concerning the following question:
if Today eq 5days_lest_then_end_of_month; do stuff else skipp
This prints out:#!/usr/local/bin/perl -w use diagnostics; use strict; use Date::Calc qw(:all); use Date::Calendar; use Date::Calendar::Profiles qw( $Profiles ); my $cal = Date::Calendar->new( $Profiles->{'DE-NW'} ); # or wherever y +ou are my @today = Today(); my @date = Add_Delta_YM($today[0],$today[1],1, 0,1); # first of next m +onth my $date = $cal->add_delta_workdays(@date,-5); # 5 business days befor +e that #my $date = $cal->add_delta_workdays(@date,-5); # 5 business days befo +re that $date->date_format(2); print "date = $date\n"; print "today = @today\n";
So i guess the question is that all i need is to somehow rearrange these dates in a standard form so i can use it in that conditional. As always, any suggestions will be very helpful...Thanksdate = Fri 23-Nov-2001 today = 2001 11 21
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Timed event
by kwoff (Friar) on Nov 22, 2001 at 03:26 UTC | |
by Bobcat (Scribe) on Nov 22, 2001 at 03:37 UTC | |
|
Re: Timed event
by data67 (Monk) on Nov 22, 2001 at 03:22 UTC |