From: Iskren Chernev Date: Sun, 21 Jul 2013 08:38:34 +0000 (-0200) Subject: Use week field in iso duration parsing X-Git-Tag: 2.3.0~10^2~17 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F941%2Fhead;p=thirdparty%2Fmoment.git Use week field in iso duration parsing --- diff --git a/moment.js b/moment.js index ad5e74fc9..edc8cd90c 100644 --- a/moment.js +++ b/moment.js @@ -1086,10 +1086,11 @@ duration = { y: parseIso(isoMatched[1]), M: parseIso(isoMatched[2]), - d: parseIso(isoMatched[3]) + parseIso(isoMatched[7]) * 7, + d: parseIso(isoMatched[3]), h: parseIso(isoMatched[4]), m: parseIso(isoMatched[5]), s: parseIso(isoMatched[6]), + w: parseIso(isoMatched[7]), }; }