From 0d28902919ba7c417c1f423583f62ab17ed47571 Mon Sep 17 00:00:00 2001 From: benfo Date: Tue, 16 Jul 2013 06:20:37 +0200 Subject: [PATCH] Moment: Add a few more week related methods for version 2.1.0 --- moment/moment-tests.ts | 8 ++++++++ moment/moment.d.ts | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/moment/moment-tests.ts b/moment/moment-tests.ts index 492400f90..684c91e3f 100644 --- a/moment/moment-tests.ts +++ b/moment/moment-tests.ts @@ -78,6 +78,14 @@ moment().startOf('year'); moment().month(0).date(1).hours(0).minutes(0).seconds(0).milliseconds(0); moment().startOf('hour'); moment().minutes(0).seconds(0).milliseconds(0); +moment().weekday(); +moment().weekday(0); +moment().isoWeekday(1); +moment().isoWeekday(); +moment().weekYear(2); +moment().weekYear(); +moment().isoWeekYear(3); +moment().isoWeekYear(); var getMilliseconds: number = moment().milliseconds(); var getSeconds: number = moment().seconds(); diff --git a/moment/moment.d.ts b/moment/moment.d.ts index 5c152c717..e937f53df 100644 --- a/moment/moment.d.ts +++ b/moment/moment.d.ts @@ -95,6 +95,14 @@ interface Moment { seconds(): number; milliseconds(ms: number): Moment; milliseconds(): number; + weekday(): Moment; + weekday(d: number): Moment; + isoWeekday(): Moment; + isoWeekday(d: number): Moment; + weekYear(): Moment; + weekYear(d: number): Moment; + isoWeekYear(): Moment; + isoWeekYear(d: number): Moment; from(f: Moment): string; from(f: Moment, suffix: boolean): string;