mirror of
https://github.com/cqwu-ehall/cqwu-ehall.git
synced 2024-11-21 18:38:18 +00:00
✨ Support exam days_left
This commit is contained in:
parent
99daff1564
commit
146af56314
@ -25,6 +25,11 @@ class AiExam(BaseModel):
|
||||
""" 获取课程名称(去除课程编号) """
|
||||
return self.name.split("]")[-1]
|
||||
|
||||
@property
|
||||
def days_left(self) -> int:
|
||||
""" 获取距离考试的天数 """
|
||||
return (self.get_time()[0] - datetime.datetime.now()).days
|
||||
|
||||
def get_time(self) -> Tuple[datetime.datetime, datetime.datetime]:
|
||||
""" 获取格式化后的考试时间 """
|
||||
# 2023-06-25(18周 星期日)09:00-11:00
|
||||
|
2
setup.py
2
setup.py
@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
||||
|
||||
setuptools.setup(
|
||||
name="cqwu", # 用自己的名替换其中的YOUR_USERNAME_
|
||||
version="0.0.11", # 包版本号,便于维护版本
|
||||
version="0.0.12", # 包版本号,便于维护版本
|
||||
author="omg-xtao", # 作者,可以写自己的姓名
|
||||
author_email="xtao@xtaolink.cn", # 作者联系方式,可写自己的邮箱地址
|
||||
description="A cqwu ehall client.", # 包的简述
|
||||
|
Loading…
Reference in New Issue
Block a user