in reply to Re^2: Getting the Latest Date Issue
in thread Getting the Latest Date Issue

You are starting with today's date and the first thing you do in your cycle is to add one day.

To keep the cycle untouched, you should subtract one day to the initial ($year,$mon,$mday), so that the first iteration gives you today.

Replies are listed 'Best First'.
Re^4: Getting the Latest Date Issue
by Anonymous Monk on Jan 22, 2008 at 19:49 UTC
    If I do this
    ($year,$mon,$mday) = Add_Delta_Days($year,$mon,$mday,-1); the dates go backward, where else could I subtract to get today's date printed?
      You do that once before the for loop.
      Inside the loop all remains unchanged.
        Thanks!