标签: javascript
11.06.2012 17:40
我需要的所有东西都要放入数组值
mydate.day = 11; mydate.month = 6; mydate.year = 2012; mydate.hours = 17; mydate.minutes = 40;
答案 0 :(得分:16)
"11.06.2012 17:40".split(/[.: ]/).map(Number); //[11, 6, 2012, 17, 40]