Skip to content

Commit

Permalink
feat(clock): 添加了weekdayChs
Browse files Browse the repository at this point in the history
  • Loading branch information
Raven-Book committed Sep 25, 2024
1 parent 9fd1db9 commit 4db1660
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/public/js/macro/clock.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 20 additions & 3 deletions docs/src/黑星的Macro合集/宏列表 第一弹.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,14 @@ _npc.first _npc.last

---

7. `$clock` 获取相关数据
7. `<<weekday>>`
该宏用于显示当前的星期。

可以通过设置在全局JS设置 `Clock.weekdays` 来覆盖默认的输出。例如: `Clock.weekdays=['周天','周一','周二','周三','周四','周五','周六'];`

**输出示例:** `星期三`

8. `$clock` 获取相关数据

* `$clock.year`
* `$clock.month`
Expand Down Expand Up @@ -370,11 +377,21 @@ _npc.first _npc.last

---

4. `$clock.weekday()`
4. `$clock.weekday`
该方法用于获取当前日期是星期几返回值为数字。`0` 是星期天, `1~6` 是周一到周六。

**输出示例:**
当前日期为 `2024-09-25`,执行 `weekday()` 返回 `3`
当前日期为 `2024-09-25`,执行 `weekday` 返回 `3`

---

5. `$clock.weekdayChs`
该方法用于获取当前日期是星期几,返回值为字符串。

可以通过设置在全局JS设置 `Clock.weekdays` 来覆盖默认的输出。例如: `Clock.weekdays=['周天','周一','周二','周三','周四','周五','周六'];`

**输出示例:**
当前日期为 `2024-09-25`,执行 `weekday` 返回 `星期三`

### 6.5 触发器

Expand Down

0 comments on commit 4db1660

Please sign in to comment.