I have a problem with the DateTime::Precise module. I have created the object with the following parameters.
The problem i am facing here is, when i increment the month by 1, it increments the date by 31 days and so it gets the date 2/31. But which is not a valid date. So, perl compensates by converting the days over into the next month. So 2/31 becomes 3/3.
I have put this piece of code in another script which processes the records from the text file. I am facing this problem only when create the object from the January month having the date > 29.
Can any one tell me how to get the correct month value when i do inc_month from the January object (having the $date >29 )?
I can put a if condition to check the january objects.But, I am still trying to solve it through the module's methods.
Have any of you faced this problem ? Any help would be highly appreciated.
Thanks for your valuable time.
Regards,
S.Venni Rajan.
"A Flair For Excellence."
BK Systems.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |