Skip to content

Commit

Permalink
🔖 release v4.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kinegratii committed Jun 27, 2024
1 parent 85aec53 commit 80dec66
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion borax/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '4.1.0'
__version__ = '4.1.1'
__author__ = 'kinegratii'
2 changes: 1 addition & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 更新日志

## v4.1.1
## v4.1.1 (20240630)

- 新增创建农历年或农历月最后一天的方法 `LunarDate.last_day`
- `SolarFestival``LunarFestival` 初始化函数 `freq` 参数支持字符串设置( [ #56](https://github.com/kinegratii/borax/issues/56)
Expand Down
13 changes: 13 additions & 0 deletions docs/guides/lunardate.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,19 @@ LunarDate(2018, 6, 29, 0)
LunarDate(2018, 7, 2, 0)
```

获取农历年或农历月的最后一天。(v4.1.1新增。)

```bash
>>>LunarDate.last_day(2023)
LunarDate(2023, 12, 30)
>>>LunarDate.last_day(2023, 2)
LunarDate(2023, 2, 30)
>>>LunarDate.last_day(2023, 2, 1)
LunarDate(2023, 2, 29, 1)
```



`lunardate` 模块可用的日期上下限

```shell
Expand Down
Binary file modified docs/images/app_festival_creator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions tests/test_lunardate.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ def test_create_specific_dates(self):
self.assertEqual(5, LCalendars.delta(today.after(5), today))
self.assertEqual(-5, LCalendars.delta(today.before(5), today))

self.assertEqual(LunarDate(2023, 12, 30), LunarDate.last_day_of_year(2023))

def test_last_day(self):
self.assertEqual(LunarDate(2023, 12, 30), LunarDate.last_day(2023))
self.assertEqual(LunarDate(2023, 1, 29), LunarDate.last_day(2023, 1))
Expand Down

0 comments on commit 80dec66

Please sign in to comment.