![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@aqzhyi/dayjs
Advanced tools
```ts
import { dayjs } from '@aqzhyi/dayjs'
dayjs(1704038400) // pass 10-digit Unix Timestamp including seconds OK
dayjs(1704038400_000) // pass 13-digit Unix Timestamp including milliseconds OK
dayjs(1704038400_000_000) // pass 16-digit Unix Timestamp including wtf? OK
dayjs(1704038400).time() // return 1704038400000
dayjs(1704038400_000).unix() // return 1704038400
// wtf?
dayjs(1704038400_000_000).time() // return 1704038400000
dayjs(1704038400_000_000).unix() // return 1704038400
```
```ts
dayjs('1704038400') // OK
dayjs('1704038400_000') // OK
dayjs('1704038400_000_000') // OK
dayjs('1704038400e3') // OK
dayjs('1704038400e6') // OK
```
```ts
dayjs().setTime(-1).format('HH:mm:ss') // '00:00:00'
dayjs().setTime(0).format('HH:mm:ss') // '00:00:00'
dayjs().setTime(6.15).format('HH:mm:ss') // '06:15:00'
dayjs().setTime(6.3).format('HH:mm:ss') // '06:30:00'
dayjs().setTime(6.45).format('HH:mm:ss') // '06:45:00'
dayjs().setTime(6.5).format('HH:mm:ss') // '06:50:00'
dayjs().setTime(6.59).format('HH:mm:ss') // '06:59:00'
dayjs().setTime(6.77).format('HH:mm:ss') // '06:59:59'
dayjs().setTime(23.59).format('HH:mm:ss') // '23:59:00'
dayjs().setTime(23.5959).format('HH:mm:ss') // '23:59:59'
dayjs().setTime(24).format('HH:mm:ss') // '23:59:59'
dayjs().setTime('-1').format('HH:mm:ss') // '00:00:00'
dayjs().setTime('0').format('HH:mm:ss') // '00:00:00'
dayjs().setTime('6:15').format('HH:mm:ss') // '06:15:00'
dayjs().setTime('6:3').format('HH:mm:ss') // '06:30:00'
dayjs().setTime('6:45').format('HH:mm:ss') // '06:45:00'
dayjs().setTime('6:5').format('HH:mm:ss') // '06:50:00'
dayjs().setTime('6:59').format('HH:mm:ss') // '06:59:00'
dayjs().setTime('6:77').format('HH:mm:ss') // '06:59:59'
dayjs().setTime('23:59').format('HH:mm:ss') // '23:59:00'
dayjs().setTime('23:5959').format('HH:mm:ss') // '23:59:59'
dayjs().setTime('24').format('HH:mm:ss') // '23:59:59'
```
```ts
const now = dayjs()
now.formatDate() // '2023/01/01'
now.formatDateTime() // '2023/01/01 00:00'
now.formatDateTimeSeconds() // '2023/01/01 00:00:00'
```
> 我是誰?我在哪?我在這裡幹嘛?
FAQs
```ts import { dayjs } from '@aqzhyi/dayjs'
The npm package @aqzhyi/dayjs receives a total of 0 weekly downloads. As such, @aqzhyi/dayjs popularity was classified as not popular.
We found that @aqzhyi/dayjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.