Skip to content

v2.4.2: Select February 30th of the lunar year causes Unexpected Application Error! #194

@LucasJi

Description

@LucasJi

描述(Description)

Just as the title says, when selecting Feb 30, the online astrolabe shows an error page.
image

I would appreciate it if the author could add exception handling. This would make not only this library but also the React hook iztro-hook more flexible for other developers in resolving exceptions.

版本(Version)

重现(Reproduce)

  • 调用的方法(funciton name)

lunar2solar

  • 参数(parameters)

1997-2-30(Lunar)

  • 返回值(returns)
Unexpected Application Error!
only 29 days in lunar year 1997 month 2
Error: only 29 days in lunar year 1997 month 2
    at zr.fromYmdHms (https://ziwei.pub/assets/main-9b6d5ef5.js:531:433671)
    at zr.fromYmd (https://ziwei.pub/assets/main-9b6d5ef5.js:531:433418)
    at a (https://ziwei.pub/assets/main-9b6d5ef5.js:531:471599)
    at S (https://ziwei.pub/assets/main-9b6d5ef5.js:531:490662)
    at Object.w (https://ziwei.pub/assets/main-9b6d5ef5.js:531:490919)
    at https://ziwei.pub/assets/main-9b6d5ef5.js:531:545457
    at Ax (https://ziwei.pub/assets/main-9b6d5ef5.js:40:24296)
    at ih (https://ziwei.pub/assets/main-9b6d5ef5.js:40:42448)
    at JV (https://ziwei.pub/assets/main-9b6d5ef5.js:40:34557)
    at E (https://ziwei.pub/assets/main-9b6d5ef5.js:25:1540)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions