Hi
I need to calculate next payment date based on start payment date and mode of pament (i.e yearly, quarterly, half-yearly and monthly)
If the start payment is 2008-07-08 (Y-m-d) and mode of payment is half yearly than the next payment date would be 2009-01-08 .
For the next time, the next payment date would be start payment date and we need to calculate next payment date.
Same with other modes of payment(quarterly, yearly and monthly)
Is there any inbuilt function in Php for this? or may be is there any efficient way to perform this action
Any suggestions
Thanks
sampada
Date calculation
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Date calculation
Heres a start,
Code: Select all
echo strtotime('2008-07-08', '+6 months');-
sureshmaharana
- Forum Commoner
- Posts: 30
- Joined: Thu Jul 03, 2008 4:20 am
- Contact:
Re: Date calculation
Hi,
You can use this for half yearly:
$date = date('Y-m-d', strtotime("+6 Month"));
Regards,
Suresh Maharana
You can use this for half yearly:
$date = date('Y-m-d', strtotime("+6 Month"));
Regards,
Suresh Maharana