@geeeger/date-utils
v1.0.0
Published
date utils
Downloads
10
Readme
@geeeger/date-utils
methods
getGMT8LocalDate
import { getGMT8LocalDate } from '@geeeger/date-utils'
const unixTimestamp = Math.floor(Date.now() / 1000)
const date = getGMT8LocalDate(unixTimestamp)
console.log([date.getFullYear(), date.getMonth(), date.getDate()].join('.'))
console.log([date.getHours(), date.getMinutes(), date.getSeconds()].join(':'))