mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-25 11:11:46 +08:00
Merge pull request #6279 from optical/moment-set-object
Add object parsing overload to moment setter
This commit is contained in:
@@ -127,6 +127,15 @@ moment().isoWeeks(45);
|
||||
moment().dayOfYear();
|
||||
moment().dayOfYear(45);
|
||||
|
||||
moment().set('year', 2013);
|
||||
moment().set('month', 3); // April
|
||||
moment().set('date', 1);
|
||||
moment().set('hour', 13);
|
||||
moment().set('minute', 20);
|
||||
moment().set('second', 30);
|
||||
moment().set('millisecond', 123);
|
||||
moment().set({'year': 2013, 'month': 3});
|
||||
|
||||
var getMilliseconds: number = moment().milliseconds();
|
||||
var getSeconds: number = moment().seconds();
|
||||
var getMinutes: number = moment().minutes();
|
||||
|
||||
Reference in New Issue
Block a user