diff options
Diffstat (limited to 'manager/library/date/testHumanReadableTime.php')
-rw-r--r-- | manager/library/date/testHumanReadableTime.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/manager/library/date/testHumanReadableTime.php b/manager/library/date/testHumanReadableTime.php new file mode 100644 index 0000000..177d650 --- /dev/null +++ b/manager/library/date/testHumanReadableTime.php @@ -0,0 +1,16 @@ +<?php
+defined('LIBARARY_PATH')
+ || define('LIBRARY_PATH', realpath(dirname(__FILE__) . '/..'));
+
+require_once('HumanReadableTime.php');
+
+$hrf = HumanReadableTime::HR2Seconds($argv[1], true);
+print 'Seconds: ' . $hrf . "\n";
+
+print 'Default: ' . HumanReadableTime::Seconds2HR($hrf) . "\n";
+print 'Week: ' . HumanReadableTime::Seconds2HR($hrf, 'w') . "\n";
+print 'Day: ' . HumanReadableTime::Seconds2HR($hrf, 'd') . "\n";
+print 'Hour: ' . HumanReadableTime::Seconds2HR($hrf, 'h') . "\n";
+print 'Minute: ' . HumanReadableTime::Seconds2HR($hrf, 'm') . "\n";
+print 'Second: ' . HumanReadableTime::Seconds2HR($hrf, 's') . "\n";
+
|