fix[parseTime]: fix getDay() bug #152
This commit is contained in:
		@@ -25,7 +25,8 @@ export function parseTime(time, cFormat) {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
  const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
 | 
					  const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
 | 
				
			||||||
    let value = formatObj[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) {
 | 
					    if (result.length > 0 && value < 10) {
 | 
				
			||||||
      value = '0' + value
 | 
					      value = '0' + value
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user