---
title: "Discussion on \"dayjs 的用法 plugin isSameOrBefore\" | Hashnode"
description: "Discussion on \"dayjs 的用法 plugin isSameOrBefore\". doc: https://day.js.org/docs/en/query/is-same-or-before  \n1. 前面要加 import2. dayjs 要 dayjs.extend(isSameOrBefore)3. 直接用 tz() 就好，裡面不用加 ('Asia/Taipei') 我沒聽懂原因。  \nimport isSameOrBefore from 'dayjs/plugin/isSameOrBefore'dayjs.extend(isSameOrBefore)const to..."
url: "https://hashnode.com/posts/dayjs-plugin-issameorbefore/667d2b6f1ba374fb1263f162"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [dayjs 的用法 plugin isSameOrBefore](https://sunpochin.hashnode.dev/dayjs-plugin-issameorbefore?utm_source=hashnode&utm_medium=feed)

doc: https://day.js.org/docs/en/query/is-same-or-before 1. 前面要加 import2. dayjs 要 dayjs.extend(isSameOrBefore)3. 直接用 tz() 就好，裡面不用加 ('Asia/Taipei') 我沒聽懂原因。 import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'dayjs.extend(isSameOrBefore)const to...

Jun 27, 2024 · 1 min read · sunpochin.hashnode.dev  
Read the article

-   [#issameorbefore](https://hashnode.com/tag/issameorbefore)
-   [#dayjs](https://hashnode.com/tag/dayjs)
-   [#plugins](https://hashnode.com/tag/plugins)

## Written by

[Sun Pochin](https://hashnode.com/@sunpochin)

@sunpochin · Taipei, Taiwan

  
[View profile](https://hashnode.com/@sunpochin)

Developer, building thins on web.

I was the main web front-end engineer responsible for developing and maintaining the customer-facing platform for WisdomHall (品學堂) in 2024 Q3 Q4, code reviewed by CTO and a senior engineer. http://learning.wisdomhall.com.tw has total active 257k users, according to their Facebook post: https://www.facebook.com/share/p/1MnjbwZxCV/ My tech stack includes JavaScript, Vue 2, Nuxt 2, git, and Docker.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
