This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
70%
Published
a year ago (0.1.4)
dayjs
https://github.com/iamkun/dayjs.
Examples
first new a ts file named test.ts
.
import { dayjs } from "jsr:@xtool/dayjs"; let str = dayjs().format("YYYY-MM-DD HH:mm:ss"); // 格式化字符串 console.log(str); let week = dayjs().day(); // 返回星期几 console.log(week);
then run the below command:
# run the test.ts $ deno run test.ts
Add Package
deno add jsr:@xtool/dayjs
Import symbol
import * as dayjs from "@xtool/dayjs";
Import directly with a jsr specifier
import * as dayjs from "jsr:@xtool/dayjs";
Add Package
pnpm i jsr:@xtool/dayjs
pnpm dlx jsr add @xtool/dayjs
Import symbol
import * as dayjs from "@xtool/dayjs";
Add Package
yarn add jsr:@xtool/dayjs
yarn dlx jsr add @xtool/dayjs
Import symbol
import * as dayjs from "@xtool/dayjs";
Add Package
vlt install jsr:@xtool/dayjs
Import symbol
import * as dayjs from "@xtool/dayjs";
Add Package
npx jsr add @xtool/dayjs
Import symbol
import * as dayjs from "@xtool/dayjs";
Add Package
bunx jsr add @xtool/dayjs
Import symbol
import * as dayjs from "@xtool/dayjs";