1.0.0 • Published 5 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
5 years ago