Login   Register  
PHP Classes
elePHPant
Icontem

File: examples-static.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Sallar Kaboli  >  Jalali (Shamsi) DateTime Class  >  examples-static.php  >  Download  
File: examples-static.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Jalali (Shamsi) DateTime Class
Convert and format dates in the Jalali calendar
Author: By
Last change:
Date: 2 years ago
Size: 624 bytes
 

Contents

Class file image Download
<?php

//Include
require_once dirname(__FILE__) . '/jdatetime.class.php';

//Just adding routine html tags and setting encoding to view Persian characters correctly.
echo "<html>";
echo 
"<head>";
echo 
"<meta charset='utf-8'>";
echo 
"</head>";
echo 
"<body>";

date_default_timezone_set('Asia/Tehran');

echo 
jDateTime::date('l j F Y H:i');
echo 
"<br />";
echo 
jDateTime::date('Y-m-d'falsefalse);
echo 
"<br />";
echo 
jDateTime::date('Y-m-d'falsefalsefalse);
echo 
"<br />";
echo 
jDateTime::date("l j F Y H:i T"falsenullnull'America/New_York');

//Just adding routine html tags.
echo "</body>";
echo 
"</html>";