Join Slack
Powered by
`hour < 12 ? "AM" : "PM"` would be right... 0-1...
# javascript
t
Tim
08/18/2023, 6:54 PM
hour < 12 ? "AM" : "PM"
would be right... 0-11 is am, 12-23 is pm. Assuming that the value in hour is a number from 0-24...
Open in Slack
Previous
Next