IHYPRESS PROGRAMMING
PHP programs with code and output for beginners
php logo
987 Total Pageviews
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."; ?>
Hergestellt in Deutschland / Made in Germany
Current Time: 1743801727
Today date: April 4, 2025, 2:22 pm.
Tomorrow's date: April 5, 2025, 12:00 am.
Next week's date: April 11, 2025, 2:22 pm.
Next month's date: May 4, 2025, 2:22 pm.
Next Saturday's date: April 5, 2025, 12:00 am.
Server's time zone: PDT or America/Los_Angeles.
Today's sunrise time in Phoenix: 06:12.
Today's sunset time in Phoenix: 18:48.
 
COPYRIGHT © 2015-2025 IHY PRESS Frankfurt am Main 60329 Deutschland
eXTReMe Tracker - Free Website Statistics