Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let now = new Date()
- let ampm = "AM"
- let [hours, minutes, seconds] = [now.getHours(), now.getMinutes(), now.getSeconds()]
- if(hours == 0) {hours = 12}
- if(hours > 12) {hours = hours-12; ampm = "PM"}
- hours = hours * 60 * 60 * 1000
- minutes = minutes * 60 * 1000
- seconds = seconds * 1000
- let specialDate = now.getTime() - hours - minutes - seconds
- let w = new ListWidget()
- let stack = w.addStack()
- let time = stack.addDate(new Date(specialDate))
- time.applyTimerStyle()
- Script.setWidget(w)
- w.presentMedium()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement