MomentJS - 物件



Moment 可以以物件形式獲取日期、時間單位,如下所示:

語法

moment({unit: value, ...});

示例

var day = moment({ year :2017, month :10, day :3, hour :15, minute :10, second :3, millisecond :123});

輸出

String Objects
momentjs_parsing_date_and_time.htm
廣告
© . All rights reserved.