forked from opentiny/tiny-vue
feat(common): Compatible with yy/MM/dd HH: mm: ss time format (#1121)
This commit is contained in:
parent
594c7fa8f0
commit
a182bb2034
|
@ -33,6 +33,7 @@ const dateFormatRegs = {
|
|||
'M{1,2}': /M{1,2}/,
|
||||
'd{1,2}': /d{1,2}/,
|
||||
'h{1,2}': /h{1,2}/,
|
||||
'H{1,2}': /H{1,2}/,
|
||||
'm{1,2}': /m{1,2}/,
|
||||
's{1,2}': /s{1,2}/,
|
||||
'S{1,3}': /S{1,3}/,
|
||||
|
@ -406,6 +407,7 @@ export const format = function (date, dateFormat = 'yyyy/MM/dd hh:mm:ss') {
|
|||
'M{1,2}': date.getMonth() + 1,
|
||||
'd{1,2}': date.getDate(),
|
||||
'h{1,2}': date.getHours(),
|
||||
'H{1,2}': date.getHours(),
|
||||
'm{1,2}': date.getMinutes(),
|
||||
's{1,2}': date.getSeconds(),
|
||||
'S{1,3}': date.getMilliseconds(),
|
||||
|
|
Loading…
Reference in New Issue