diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-20 14:20:44 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-20 14:20:44 +0700 |
| commit | e33a330786ffbfcd774de00dc697c6dff47faf27 (patch) | |
| tree | cd35ce2a36c37cd8c6e991862f929d83dcd45464 /src/core/utils/greeting.js | |
| parent | fdefe7cfe899125a9bd553b542976eed0de919c1 (diff) | |
fix
Diffstat (limited to 'src/core/utils/greeting.js')
| -rw-r--r-- | src/core/utils/greeting.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/utils/greeting.js b/src/core/utils/greeting.js new file mode 100644 index 00000000..014c0e3c --- /dev/null +++ b/src/core/utils/greeting.js @@ -0,0 +1,9 @@ +const greeting = () => { + let hours = new Date().getHours() + if (hours < 11) return 'Selamat Pagi' + if (hours < 15) return 'Selamat Siang' + if (hours < 18) return 'Selamat Sore' + return 'Selamat Malam' +} + +export default greeting
\ No newline at end of file |
