File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -129,9 +129,18 @@ export function dateStringUTC(date) {
129
129
}
130
130
131
131
export function dateStringLocale ( date ) {
132
- let full = String ( date . getDate ( ) ) + ' ' +
133
- shortMonth ( date . getMonth ( ) ) + ' ' +
134
- String ( date . getFullYear ( ) ) + ' at ' ;
132
+ let month = date . getMonth ( ) + 1
133
+ let date2 = date . getDate ( )
134
+ if ( month < 10 ) {
135
+ month = "0" + month ;
136
+ }
137
+ if ( date2 < 10 ) {
138
+ date2 = "0" + date2 ;
139
+ }
140
+ // let full = String(date.getDate()) + ' ' +
141
+ // shortMonth(date.getMonth()) + ' ' +
142
+ // String(date.getFullYear()) + ' at ';
143
+ let full = String ( String ( date . getFullYear ( ) + '-' + month + '-' + date2 + ' ' ) )
135
144
let time = {
136
145
hours : String ( date . getHours ( ) ) ,
137
146
minutes : String ( date . getMinutes ( ) ) ,
You can’t perform that action at this time.
0 commit comments