IHYPRESS PROGRAMMING
PHP programs with code and output for beginners
php logo
HOME | ASP | C | CSS | GNUPLOT | HTML | JAVASCRIPT | PERL | PHP | PYTHON | RUBY | SVG
PHP ❯ Date & Time
<13>
<?php $time = time(); echo "Current Time: $time<br>"; $today = date("F j, Y, g:i a"); echo "Today date: $today.<br>"; $tomorrow = date('F j, Y, g:i a', strtotime("tomorrow")); echo "Tomorrow's date: $tomorrow.<br>"; $nw = date('F j, Y, g:i a', strtotime("+1 week")); echo "Next week's date: $nw.<br>"; $nm = date('F j, Y, g:i a', strtotime("+1 month")); echo "Next month's date: $nm.<br>"; $sat = date('F j, Y, g:i a', strtotime("next Saturday")); echo "Next Saturday's date: $sat.<br>"; $tz = date('T'); $tz2 = date('e'); echo "Server's time zone: $tz or $tz2.<br>"; $sunrise = date_sunrise(time(), SUNFUNCS_RET_STRING, 33, -112, 90, -7); echo "Today's sunrise time in Phoenix: $sunrise.<br>"; $sunset = date_sunset(time(), SUNFUNCS_RET_STRING, 33, -112, 90, -7); echo "Today's sunset time in Phoenix: $sunset.<br>"; ?>
Hergestellt in Deutschland / Made in Germany
Current Time: 1718768278
Today date: June 18, 2024, 8:37 pm.
Tomorrow's date: June 19, 2024, 12:00 am.
Next week's date: June 25, 2024, 8:37 pm.
Next month's date: July 18, 2024, 8:37 pm.
Next Saturday's date: June 22, 2024, 12:00 am.
Server's time zone: PDT or America/Los_Angeles.
Today's sunrise time in Phoenix: 05:22.
Today's sunset time in Phoenix: 19:36.
COPYRIGHT © 2015-2024 IHY PRESS Frankfurt am Main 60329 Deutschland
Earn Free Bitcoin