From 93cd50d5bbf0a913c3b89464d937610a5f8493d2 Mon Sep 17 00:00:00 2001 From: benfo Date: Tue, 16 Jul 2013 06:16:57 +0200 Subject: [PATCH] Moment: Add string overloads for month and day --- moment/moment-tests.ts | 2 ++ moment/moment.d.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/moment/moment-tests.ts b/moment/moment-tests.ts index 535c13597..492400f90 100644 --- a/moment/moment-tests.ts +++ b/moment/moment-tests.ts @@ -70,7 +70,9 @@ moment().minutes(30); moment().hours(12); moment().date(5); moment().day(5); +moment().day("Sunday"); moment().month(5); +moment().month("January"); moment().year(1984); moment().startOf('year'); moment().month(0).date(1).hours(0).minutes(0).seconds(0).milliseconds(0); diff --git a/moment/moment.d.ts b/moment/moment.d.ts index 82880d933..5c152c717 100644 --- a/moment/moment.d.ts +++ b/moment/moment.d.ts @@ -80,8 +80,10 @@ interface Moment { year(y: number): Moment; year(): number; month(M: number): Moment; + month(M: string): Moment; month(): number; day(d: number): Moment; + day(d: string): Moment; day(): number; date(d: number): Moment; date(): number;