Created
March 16, 2022 01:15
-
-
Save mdestafadilah/61584f53d9eac3f0ad5382f2a72a12a6 to your computer and use it in GitHub Desktop.
Ucapan Selamat Datang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: https://stackoverflow.com/a/46574723 | |
if(!function_exists('ucapan_selamat')) { | |
function ucapan_selamat() { | |
$hour = date("G"); | |
return ($hour >= 3 && $hour < 12) | |
? "Selamat Pagi, " | |
: (($hour >= 12 && $hour < 17) ? "Selamat Siang, " : "Selamat Malam, "); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment