#native_company# #native_desc#
#native_cta#

Billing and Due Dates

By g
on November 12, 2002

Version: 1.02

Type: Sample Code (HOWTO)

Category: Calendars/Dates

License: GNU General Public License

Description: Computes billing and due dates

<?php

$date = "11/27/1969";
$nperiod = 12;

for($i=0;$i<$nperiod;$i++)
{

	list($year, $month, $day) = explode("/",$date);
	
	$date3 = mktime(0,0,0,$month,$day+30,$year);
	$date5 = mktime(0,0,0,$month,$day+35,$year);
	
	//readable format mm/dd/YY, for sql purposes use YY/mm/dd.
	$date2 = date("m/d/Y",$date3);
	$date4 = date("m/d/Y",$date5);
	
	$date = date("m/d/Y",$date3);
	

	print "<b>Billing Date: </b>".$date2."<b> Due Date: </b>".$date4.'<br />';
					
	$date = date("m/d/Y",$date3);
}
		
?>