File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 77 */
88
99module . exports = {
10+ DATE_FORMAT : 'extendedIsoDateTime' ,
11+ DATE_FORMAT_SIMPLE : 'extendedIsoTime' ,
12+
1013 /**
1114 * @type {K_ERROR_LIKE_KEYS }
1215 */
Original file line number Diff line number Diff line change 22
33module . exports = formatTime
44
5+ const {
6+ DATE_FORMAT ,
7+ DATE_FORMAT_SIMPLE
8+ } = require ( '../constants' )
9+
510const { dateformat, DateFormatter } = require ( '@pinojs/dateformat' )
611const createDate = require ( './create-date' )
712const isValidDate = require ( './is-valid-date' )
813
9- // 'HH:MM:ss.l'
10- const simpleDateFormatter = new DateFormatter ( function simple ( date ) {
11- return `${ this . HH ( date ) } :${ this . MM ( date ) } :${ this . ss ( date ) } .${ this . l ( date ) } `
12- } )
13- // 'yyyy-mm-dd HH:MM:ss.l o'
14- const standardDateFormatter = new DateFormatter ( function standard ( date ) {
15- return `${ this . yyyy ( date ) } -${ this . mm ( date ) } -${ this . dd ( date ) } ${ this . HH ( date ) } :${ this . MM ( date ) } :${ this . ss ( date ) } .${ this . l ( date ) } ${ this . o ( date ) } `
16- } )
14+ const simpleDateFormatter = new DateFormatter ( DATE_FORMAT_SIMPLE )
15+ const standardDateFormatter = new DateFormatter ( DATE_FORMAT )
1716
1817/**
1918 * Checks if the given format string is a UTC format.
You can’t perform that action at this time.
0 commit comments