diff options
author | Paul Duncan <pabs@pablotron.org> | 2018-09-02 20:16:58 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2018-09-03 09:54:49 -0400 |
commit | f054c511e79101e1797d088ddb003bb323ab191d (patch) | |
tree | 76239d4c74d904b1e1d71a0018bb7eb72aa569ae /examples | |
parent | cb8f920e52c5b9473f43a107310cb6bb1ac0874b (diff) | |
download | zipstream-php-f054c511e79101e1797d088ddb003bb323ab191d.tar.bz2 zipstream-php-f054c511e79101e1797d088ddb003bb323ab191d.zip |
clean up example links, add datetime example
Diffstat (limited to 'examples')
-rw-r--r-- | examples/08-datetime.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/08-datetime.php b/examples/08-datetime.php new file mode 100644 index 0000000..23ae41b --- /dev/null +++ b/examples/08-datetime.php @@ -0,0 +1,15 @@ +<?php +declare(strict_types = 1); + +require_once __DIR__ . '/../src/ZipStream.php'; + +# import classes +use Pablotron\ZipStream\DateTime; + +# create DateTime with current timestamp +$dt = new DateTime(time()); + +# print DOS date and time +echo "UNIX time: {$dt->time}\n"; +echo "DOS time: {$dt->dos_time}\n"; +echo "DOS date: {$dt->dos_date}\n"; |