How to generate valid date of payments?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
aldonakamura
Forum Newbie
Posts: 3
Joined: Tue Aug 31, 2004 8:51 am
Location: Sao Paulo, Brasil

How to generate valid date of payments?

Post by aldonakamura »

Hi there to all.

I´m new in programming with PHP, and I´m trying to create a function to generate valid date entries. I mean... I want to do this:

1st) I get the first date
2nd) I wanna generate the next 6,12 or 24 months

So, if I input 01/09/2004, the next 6 entries will be 01/10/2004, 01/11/2004, 01/12/2004, 01/01/2005, 01/02/2005 and 01/03/2005. Right?

But if I input 31/08/2004, the next 6 entries must be 30/09/2004, 31/10/2004, 30/11/2004, 31/12/2004, 31/01/2005, 28/02/2005.

Does anybody have a function to generate these sequential dates?

Too many thanks.
My best regards,

Aldo Nakamura
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

[php_man]strtotime[/php_man] is magic :)
Post Reply