]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[misc] Add .ts defn for parseTwoDigitYear (#4378)
authorKunal Marwaha <marwahaha@berkeley.edu>
Mon, 5 Mar 2018 08:13:23 +0000 (00:13 -0800)
committerGitHub <noreply@github.com>
Mon, 5 Mar 2018 08:13:23 +0000 (00:13 -0800)
moment.d.ts
typing-tests/moment-tests.ts

index a7ce049544384e9cc8a4a08987d29e65a8ae2ffd..b093aa311c6cabb6e2207315ae9f54ee351b2363 100644 (file)
@@ -706,6 +706,8 @@ declare namespace moment {
   export function relativeTimeRounding(): (num: number) => number;
   export function calendarFormat(m: Moment, now: Moment): string;
 
+  export function parseTwoDigitYear(input: string): number;
+
   /**
    * Constant used to enable explicit ISO_8601 format parsing.
    */
index 9373c2c7464cb047a76be5becb91defbac6f577b..2e74f819ac9621f73cae87fe289ed77de0516625 100644 (file)
@@ -1,6 +1,8 @@
 /// <reference path="../moment.d.ts" />
 import moment = require('../moment');
 
+moment.parseTwoDigitYear("50");
+
 moment().add('hours', 1).fromNow();
 
 var day = new Date(2011, 9, 16);