Location: PHPKode > scripts > PHP Online Invoice System > php-online-invoice-system/inc/date.php
<?
/*
 * Exemplar Web hosting
 * http://www.exemplar.biz
 *
 * Title: PHP Online Invoice System
 * Version: 2.0
 * Author: Exemplar
 * Date: 01-01-2006
 *
*/
// Turn off all error reporting
error_reporting(0); 
function fixDate($val)
{
$dateArray = explode("-", $val);
$val = date("M j, Y", mktime(0,0,0, $dateArray[1], $dateArray[2], $dateArray[0]));
return $val;
}
$year = date (Y);
$mon = date (m);
$day = date (d);
$today = $year."-". $mon."-". $day;

$year = date (Y);
$mon = date (m)+1;
$day = date (d);
$p_due = $year."-". $mon."-". $day;

$lyear = date (Y)-1;
$lmon = date (m);
$lday = date (d);
$lastyear = $lyear."-". $lmon."-". $lday;

//--------day of year-----------------------
$dayofyear2 = date('z');
//-----------get year only-----------------
$dateyear = date('Y', $unix_time);
//-------days in a month------------------
$days_per_month = date('t', $unix_time);
//-------week number of year starts monday--------------
$date_week_number = date('W', $unix_time);
//------get the begining of year date---------------------
$ago = $dayofyear2; // days
$ytda = time() - ($ago * 86400);
$ytd = date("Y-m-d", $ytda);

?>
Return current item: PHP Online Invoice System