📜  当前时间(); javascript代码示例

📅  最后修改于: 2022-03-11 15:01:57.797000             🧑  作者: Mango

代码示例1
var d = new Date("2020-12-09T05:30:51.01");
d.getHours(); // => 05
d.getMinutes(); // =>  30
d.getSeconds(); // => 51

/*2020 stand for year
12 stands for moth
and 09 stands for the date.
the T there seperates the date and time
!!!IMPORTANT THE VALUE IS A STRING!!!*/