Login   Register  
PHP Classes
elePHPant
Icontem

File: test_dateTime.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Dhiman Bhattacharya  >  ooDateTime  >  test_dateTime.php  >  Download  
File: test_dateTime.php
Role: ???
Content type: text/plain
Description: the test php code
Class: ooDateTime
Author: By
Last change:
Date: 2001-04-18 04:13
Size: 697 bytes
 

Contents

Class file image Download
<html>
<body>
<?php
	include( "ooDateTime.cls.php");

?>

<form name="frmMain">
	<input type="text" name="dtDateTime" size="30"><br>

	<?php
		$dt = new ooDateTime;
		$dt->setFieldName( "document.frmMain", "dtDateTime");
		$dt->setAMPM( true );
		$dt->writeJS();
		// once the value is returned in the dtDateTime field 
		// use PHP strtotime to convert it back to unix timestamp format :)
	?>

	Select Date: 
		<?=$dt->displayDay() ?>/
		<?=$dt->displayMonthName() ?>/
		<?=$dt->displayYear() ?>
		<br>
	Select Time:
		<?=$dt->displayHour() ?>:
		<?=$dt->displayMinute() ?>:
		<?=$dt->displaySecond() ?>
		<?=$dt->displayType() ?>
	<br>
</form>

</body>
</html>