From 0e75dcc42a931bca25835941a03572a4ffdc7f83 Mon Sep 17 00:00:00 2001
From: Pan <panfree23@gmail.com>
Date: Thu, 23 Aug 2018 17:52:57 +0800
Subject: [PATCH] fix[parseTime]: fix getDay() bug

---
 src/utils/index.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/utils/index.js b/src/utils/index.js
index 3e540802..43a374e4 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -25,7 +25,8 @@ export function parseTime(time, cFormat) {
   }
   const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
     let value = formatObj[key]
-    if (key === 'a') { return ['一', '二', '三', '四', '五', '六', '日'][value - 1] }
+    // Note: getDay() returns 0 on Sunday
+    if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] }
     if (result.length > 0 && value < 10) {
       value = '0' + value
     }
-- 
GitLab