initial setup of framework code
[cacert-mgr.git] / manager / library / date / testHumanReadableTime.php
1 <?php
2 defined('LIBARARY_PATH')
3 || define('LIBRARY_PATH', realpath(dirname(__FILE__) . '/..'));
4
5 require_once('HumanReadableTime.php');
6
7 $hrf = HumanReadableTime::HR2Seconds($argv[1], true);
8 print 'Seconds: ' . $hrf . "\n";
9
10 print 'Default: ' . HumanReadableTime::Seconds2HR($hrf) . "\n";
11 print 'Week: ' . HumanReadableTime::Seconds2HR($hrf, 'w') . "\n";
12 print 'Day: ' . HumanReadableTime::Seconds2HR($hrf, 'd') . "\n";
13 print 'Hour: ' . HumanReadableTime::Seconds2HR($hrf, 'h') . "\n";
14 print 'Minute: ' . HumanReadableTime::Seconds2HR($hrf, 'm') . "\n";
15 print 'Second: ' . HumanReadableTime::Seconds2HR($hrf, 's') . "\n";
16