fb00619f by sunnie Committed by GitHub

Merge pull request #29 from fayeah/patch-3

Update index.js
2 parents 0e8f5941 d7d11895
......@@ -37,7 +37,7 @@ export function parseTime(time, cFormat) {
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
// Note: getDay() returns 0 on Sunday
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] }
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
if (result.length > 0 && value < 10) {
value = '0' + value
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!