From e0c67b64e013c35a9f2ecd7ad50d68d074b254d8 Mon Sep 17 00:00:00 2001 From: mdxs Date: Mon, 6 Jan 2014 14:20:26 +0100 Subject: [PATCH] Added leftZeroFill to GGGG and gggg formats --- moment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moment.js b/moment.js index 5292c5ad4..8e8b5273b 100644 --- a/moment.js +++ b/moment.js @@ -181,7 +181,7 @@ return leftZeroFill(this.weekYear() % 100, 2); }, gggg : function () { - return this.weekYear(); + return leftZeroFill(this.weekYear(), 4); }, ggggg : function () { return leftZeroFill(this.weekYear(), 5); @@ -190,7 +190,7 @@ return leftZeroFill(this.isoWeekYear() % 100, 2); }, GGGG : function () { - return this.isoWeekYear(); + return leftZeroFill(this.isoWeekYear(), 4); }, GGGGG : function () { return leftZeroFill(this.isoWeekYear(), 5); -- 2.47.2