dayjs.jsを使った日時処理方法です。 以前「moment.jsを使って日時処理を簡単に表示する方法」を紹介しましたが、dayjs.jsも結構使われてる様なのでご紹介します。 dayjs.jsを使った日時処理を表示するCSS記述 ※必要に応じて変更して下さい。 <style> body { font-size: 18px; text-align: center; line-height: 1.6em; } h1{ text-align: center; font-size: 20px; line-height: 1.6em; padding: 20px 0 0 0; } p{ padding-bottom: 20px; } </style> dayjs.jsを使った日時処理を表示するHTML記述 ※「本日日時の取得」「指定日時の取得」「曜日の取得」を表示するエリアを用意しました。各エリ
![dayjs.jsを使った日時処理|DAD UNION – エンジニア同盟](https://cdn-ak-scissors.b.st-hatena.com/image/square/e9c25d66efada4abb655db00dc881abc2d5e5fdb/height=288;version=1;width=512/https%3A%2F%2Fdad-union.com%2Fwp-content%2Fuploads%2F2023%2F08%2Fpic20230817.jpg)