0

I am trying to figure out how to pull out the time of day in Javascript. I am then going to band these depending on the time e.g. 8-11am = Breakfast.

I know how to do that part but can't figure out how to pull out the time of day itself.

mplungjan
  • 169,008
  • 28
  • 173
  • 236
  • You mean the current time? – pmaddi Nov 17 '17 at 14:02
  • 1
    You mean `var now = new Date(); console.log(now.getHours(), now.getMinutes(), now.getSeconds())` ? – mplungjan Nov 17 '17 at 14:02
  • Possible duplicate of [How do I get the current date in JavaScript?](https://stackoverflow.com/questions/1531093/how-do-i-get-the-current-date-in-javascript) – Matus Nov 20 '17 at 12:00

0 Answers0