How to format $.now() with Jquery

前端 未结 7 2018
醉话见心
醉话见心 2021-01-11 09:38

$.now() gives me the time as miliseconds. I need to show it something like hh:mm:ss

How can I do that in Jquery?

7条回答
  •  梦毁少年i
    2021-01-11 10:29

    jQuery doesn't have date formatting. You can roll your own with the JavaScript Date object, or you can use a library that does it for you. DateJS is one such library, which provides a rich set of formatting, parsing, and manipulation functionality. However, it hasn't been maintained in years. momentjs is under active development.

提交回复
热议问题