1.0.0 • Published 4 years ago
@geeeger/date-utils v1.0.0
@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(':'))
1.0.0
4 years ago