IHYPRESS.NET > PHP
HOME
|
ASP
|
C
|
HTML/CSS
|
JAVASCRIPT
|
MATLAB
|
PERL
|
PHP
|
PYTHON
|
RUBY
PHP
> Program #13 [Date/Time]
CODE
RESULT
<
"; $today = date("F j, Y, g:i a"); echo "Today date: $today.
"; $tomorrow = date('F j, Y, g:i a', strtotime("tomorrow")); echo "Tomorrow's date: $tomorrow.
"; $nw = date('F j, Y, g:i a', strtotime("+1 week")); echo "Next week's date: $nw.
"; $nm = date('F j, Y, g:i a', strtotime("+1 month")); echo "Next month's date: $nm.
"; $sat = date('F j, Y, g:i a', strtotime("next Saturday")); echo "Next Saturday's date: $sat.
"; $tz = date('T'); $tz2 = date('e'); echo "Server's time zone: $tz or $tz2.
"; $sunrise = date_sunrise(time(), SUNFUNCS_RET_STRING, 33, -112, 90, -7); echo "Today's sunrise time in Phoenix: $sunrise.
"; $sunset = date_sunset(time(), SUNFUNCS_RET_STRING, 33, -112, 90, -7); echo "Today's sunset time in Phoenix: $sunset.
"; ?>
>
COPYRIGHT © 2019 IHYPRESS.NET. A DIVISION OF IHY PRESS, KIRKLAND, WA 98083 USA. ALL RIGHTS RESERVED.
SHARE