Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Finding the dates for the reminder mail system

by d-evil (Novice)
on Nov 09, 2008 at 14:57 UTC ( [id://722482]=note: print w/replies, xml ) Need Help??


in reply to Re: Finding the dates for the reminder mail system
in thread Finding the dates for the reminder mail system

hi ikegami,

the code for finding the last wednesday or friday does not work for the following scenario

due_date = Dec 15 2008 (Monday) Today_date = Dec 12 2008 (Friday) $delta = 3 $days_to_wed = 2, $days_to_fri = 4 $days_to_next = 2 $delta > 0 but $delta is not <= $days_to_next.

Replies are listed 'Best First'.
Re^3: Finding the dates for the reminder mail system
by ikegami (Patriarch) on Nov 09, 2008 at 15:27 UTC
    Not using use strict; and use warnings; is bad enough. Asking why code doesn't work without turning them on and fixing the errors is even worse. It would have immediately pointed out why $days_to_wed and $days_to_fri contain the wrong values.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://722482]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-26 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found