@geeeger/date-utils
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@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(':'))

Readme

Keywords

Package Sidebar

Install

npm i @geeeger/date-utils

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

2.85 kB

Total Files

5

Last publish

Collaborators

  • geeeger