PHPBuilder - Billing and Due Dates



RSS Twitter
Snippets Calendars Dates

Billing and Due Dates

by: g
|
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);
}
		
?>	

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
g

Comment:



Comment:

(Maximum characters: 1200). You have characters left.