diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 20bebdd..26e8fd5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 22 registry-url: https://registry.npmjs.org/ cache: npm - run: npm install -g npm@latest @@ -29,15 +29,15 @@ jobs: NODE_AUTH_TOKEN: ${{secrets.npm_token}} publish-github: name: Publish to GitHub Packages - runs-on: ubuntu-latest - permissions: + runs-on: ubuntu-latest + permissions: contents: read packages: write steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 22 registry-url: https://npm.pkg.github.com cache: npm scope: '@github' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 20ee438..7a23343 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: - name: Use Node.js 18.x uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 22 - name: npm install, build, and test run: | npm it diff --git a/README.md b/README.md index 50704e2..4f835ae 100644 --- a/README.md +++ b/README.md @@ -199,21 +199,21 @@ Precision can be used to limit the display of an `relative` or `duration` format | `precision=` | format=duration | |:-------------:|:-------------------:| -| seconds | 2y 6m 10d 3h 20m 8s | -| minutes | 2y 6m 10d 3h 20m | -| hours | 2y 6m 10d 3h | -| days | 2y 6m 10d | -| months | 2y 6m | -| years | 2y | +| second | 2y 6m 10d 3h 20m 8s | +| minute | 2y 6m 10d 3h 20m | +| hour | 2y 6m 10d 3h | +| day | 2y 6m 10d | +| month | 2y 6m | +| year | 2y | | `precision=` | format=relative | |:-------------:|:-------------------:| -| seconds | 25 seconds | -| minutes | now | -| hours | now | -| days | now | -| months | now | -| years | now | +| second | 25 seconds | +| minute | now | +| hour | now | +| day | now | +| month | now | +| year | now | ##### threshold (`string`, default: `P30D`) diff --git a/examples/index.html b/examples/index.html index d671479..886af5c 100644 --- a/examples/index.html +++ b/examples/index.html @@ -193,6 +193,21 @@
+ Lazily added datetime via setAttribute
+