+ 4

How to wish (live/Dynamic) based on live Time.

Wishings like Good Morning/ Good Afternoon, ...

23rd Jan 2020, 11:14 AM
Shashank Reddy Voorelli
Shashank Reddy Voorelli - avatar
2 Answers
+ 1
JS, for instance, provides access to the Date class. let timeNow = new Date(); console.log(timeNow.getHours() + ":" + timeNow.getMinutes()) From here, you deduce your greetings accordingly using conditional statements.
23rd Jan 2020, 11:23 AM
Fermi
Fermi - avatar
+ 1
Shashank Reddy Voorelli You can also use the "Triggers" for any live event listener. Jquery has an api for triggers which can easily be used https://stackoverflow.com/questions/2490825/how-to-trigger-event-in-javascript https://api.jquery.com/trigger/
23rd Jan 2020, 11:32 AM
DishaAhuja
DishaAhuja - avatar