PHP Classes

File: testDate.php

Recommend this page to a friend!
  Packages of Carl Friis-Hansen   unixDate   testDate.php   Download  
File: testDate.php
Role: Example script
Content type: text/plain
Description: Command line script to test class
Class: unixDate
Manipulate dates using the UNIX date command
Author: By
Last change:
Date: 18 years ago
Size: 595 bytes
 

 

Contents

Class file image Download
#!/usr/bin/php
<?php



  /* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **

  Simple example using command line interface.
  Should output something like:

  carl@cjfh3:~$ ./testDate.php

  2009/06/23 - 15:00 - CEST

  carl@cjfh3:~$ 


  ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */

  require_once  "./class.unixDate.php";

  $date = new unixDate( "utc"=="utc" );
  $result = $date->date(  "now +1 year +2 days +5 hours +30 minutes",
                          "%Y/%0m/%0d - %0k:%0M - %Z"               );
  print "\n".$result."\n";



?>