From acc7128b42fd0e3bac9f7d39c218c9f2350b3952 Mon Sep 17 00:00:00 2001 From: k-tecchan Date: Sun, 7 Jan 2024 23:20:08 +0900 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E4=BB=98=E8=A1=A8=E7=A4=BA=E3=82=92da?= =?UTF-8?q?yjs=20->=20Intl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 8 +------- package.json | 3 +-- src/components/Card.astro | 10 +++++++--- src/layouts/MarkdownPostLayout.astro | 9 +++++++-- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 74d2ce5..46eb9e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,8 +11,7 @@ "@astrojs/mdx": "^2.0.3", "@astrojs/sitemap": "^3.0.4", "astro": "^4.0.9", - "astro-seo": "^0.8.0", - "dayjs": "^1.11.10" + "astro-seo": "^0.8.0" }, "devDependencies": { "@playwright/test": "^1.40.1", @@ -2704,11 +2703,6 @@ "node": ">= 8" } }, - "node_modules/dayjs": { - "version": "1.11.10", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", - "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" - }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", diff --git a/package.json b/package.json index 41ca0f3..36dee18 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,7 @@ "@astrojs/mdx": "^2.0.3", "@astrojs/sitemap": "^3.0.4", "astro": "^4.0.9", - "astro-seo": "^0.8.0", - "dayjs": "^1.11.10" + "astro-seo": "^0.8.0" }, "devDependencies": { "@playwright/test": "^1.40.1", diff --git a/src/components/Card.astro b/src/components/Card.astro index ac14229..24e6580 100644 --- a/src/components/Card.astro +++ b/src/components/Card.astro @@ -1,6 +1,4 @@ --- -import dayjs from "dayjs"; - interface Props { slug: string; data: { @@ -20,7 +18,13 @@ const { slug, data } = Astro.props;

{data.description}

- {dayjs(data.published).format("YYYY/MM/DD")} + { + new Intl.DateTimeFormat("ja-JP", { + year: "numeric", + month: "2-digit", + day: "2-digit", + }).format(data.published) + }

- {dayjs(frontmatter.published).format("YYYY/MM/DD")} + { + new Intl.DateTimeFormat("ja-JP", { + year: "numeric", + month: "2-digit", + day: "2-digit", + }).format(frontmatter.published) + }