"John W. Krahn" <jwkr...@shaw.ca> writes:

> You are still not testing any cases where the month and/or year need
> to be changed.  Those only modify the day value.

I see what you mean..

These are a little tougher (at least one of them rolls back month and
year):

ev   100404 5
  send state tax payment by 15th
ev 100421 4
  my appt is today
ev 100102 3
  my appt is today
ev 101201 2
  my appt is today

-------        ---------       ---=---       ---------      -------- 

And appear to come out right:

       Let's see how it works:
  -------        ----=----       -------      
     Incoming year mon day  =  100404
     predays (5) * 86400 
     gives us this 
        offset 1269936183 
     Which leaves us with   =  100330
  -------        ----=----       -------

       Let's see how it works:
  -------        ----=----       -------      
     Incoming year mon day  =  100421
     predays (4) * 86400 
     gives us this 
        offset 1271491383 
     Which leaves us with   =  100417
  -------        ----=----       -------

       Let's see how it works:
  -------        ----=----       -------      
     Incoming year mon day  =  100102
     predays (3) * 86400 
     gives us this 
        offset 1262163783 
     Which leaves us with   =  091230
  -------        ----=----       -------

       Let's see how it works:
  -------        ----=----       -------      
     Incoming year mon day  =  101201
     predays (2) * 86400 
     gives us this 
        offset 1291021383 
     Which leaves us with   =  101129
  -------        ----=----       -------


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to