Better date format (probably going to make it settable)
This commit is contained in:
1 parent
15106771f2
commit
347848154a
1 file changed
+2
-1
@@ -1,5 +1,6 @@
|
||||
export const toLocalTime = (epoch) => {
|
||||
let localDate = new Date(0)
|
||||
localDate.setUTCSeconds(epoch)
|
||||
return localDate.toString()
|
||||
var options = { year: 'numeric', month: 'long', day: '2-digit' }
|
||||
return localDate.toLocaleDateString(options) + ' ' + localDate.toLocaleTimeString('en-US')
|
||||
}
|
||||
Reference in new issue
Block a user