We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError Traceback (most recent call last) Cell In[11], line 3 1 from zhdate import ZhDate 2 #zhd = ZhDate.today().chinese().split(' ')[0][5:] ----> 3 zhd = ZhDate.today() 4 print(zhd)
File /opt/conda/lib/python3.11/site-packages/zhdate/init.py:164, in ZhDate.today() 162 @staticmethod 163 def today(): --> 164 return ZhDate.from_datetime(datetime.now())
File /opt/conda/lib/python3.11/site-packages/zhdate/init.py:160, in ZhDate.from_datetime(dt) 157 if (year_code & 0xf) != 0 and month == (year_code & 0xf) + 1: 158 leap_month = True --> 160 return ZhDate(lunar_year, lunar_month, lunar_day, leap_month)
File /opt/conda/lib/python3.11/site-packages/zhdate/init.py:111, in ZhDate.init(self, lunar_year, lunar_month, lunar_day, leap_month) 100 """初始化函数 101 102 Arguments: (...) 108 leap_month {bool} -- 是否是在农历闰月中 (default: {False}) 109 """ 110 if not ZhDate.validate(lunar_year, lunar_month, lunar_day, leap_month): --> 111 raise TypeError('农历日期不支持,超出农历1900年1月1日至2100年12月29日,或日期不存在') 112 self.lunar_year = lunar_year 113 self.lunar_month = lunar_month
TypeError: 农历日期不支持,超出农历1900年1月1日至2100年12月29日,或日期不存在
The text was updated successfully, but these errors were encountered:
请不要重复提出issue,查看过往issue以解决问题,或者使用 zhDateTime 库
Sorry, something went wrong.
No branches or pull requests
TypeError Traceback (most recent call last)
Cell In[11], line 3
1 from zhdate import ZhDate
2 #zhd = ZhDate.today().chinese().split(' ')[0][5:]
----> 3 zhd = ZhDate.today()
4 print(zhd)
File /opt/conda/lib/python3.11/site-packages/zhdate/init.py:164, in ZhDate.today()
162 @staticmethod
163 def today():
--> 164 return ZhDate.from_datetime(datetime.now())
File /opt/conda/lib/python3.11/site-packages/zhdate/init.py:160, in ZhDate.from_datetime(dt)
157 if (year_code & 0xf) != 0 and month == (year_code & 0xf) + 1:
158 leap_month = True
--> 160 return ZhDate(lunar_year, lunar_month, lunar_day, leap_month)
File /opt/conda/lib/python3.11/site-packages/zhdate/init.py:111, in ZhDate.init(self, lunar_year, lunar_month, lunar_day, leap_month)
100 """初始化函数
101
102 Arguments:
(...)
108 leap_month {bool} -- 是否是在农历闰月中 (default: {False})
109 """
110 if not ZhDate.validate(lunar_year, lunar_month, lunar_day, leap_month):
--> 111 raise TypeError('农历日期不支持,超出农历1900年1月1日至2100年12月29日,或日期不存在')
112 self.lunar_year = lunar_year
113 self.lunar_month = lunar_month
TypeError: 农历日期不支持,超出农历1900年1月1日至2100年12月29日,或日期不存在
The text was updated successfully, but these errors were encountered: