Skip to main content
Home

latest

一个仿dayjs(https://github.com/iamkun/dayjs)的库,感谢原作者。

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with 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

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@xtool/dayjs

Import symbol

import * as dayjs from "@xtool/dayjs";
or

Import directly with a jsr specifier

import * as dayjs from "jsr:@xtool/dayjs";

Add Package

pnpm i jsr:@xtool/dayjs
or (using pnpm 10.8 or older)
pnpm dlx jsr add @xtool/dayjs

Import symbol

import * as dayjs from "@xtool/dayjs";

Add Package

yarn add jsr:@xtool/dayjs
or (using Yarn 4.8 or older)
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";