Skip to content
New issue

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

使用规则推测夏季学期周数 #546

Open
UNIDY2002 opened this issue Feb 25, 2024 · 3 comments
Open

使用规则推测夏季学期周数 #546

UNIDY2002 opened this issue Feb 25, 2024 · 3 comments
Assignees
Labels
feature New feature or functionality

Comments

@UNIDY2002
Copy link
Member

UNIDY2002 commented Feb 25, 2024

每学期周数未知令我们经常收到无法解决的反馈。幸而在已知春季学期第一天的情况下,结合农历,我们就可以准确地推知夏季学期周数。规则如下:

  • 若夏季学期所在农历年有闰月,则夏季学期共有 12 周;
  • 若夏季学期所在农历年无闰月,则下一年春节应落在夏季学期结束后第 139~145 天,可反推出夏季学期的周数。

除此之外,我们还需调整课表的预取策略,并妥善处理周数不能被 3 整除的情况。

我认为这么做的成本低于让学校加接口。

@UNIDY2002 UNIDY2002 added the feature New feature or functionality label Feb 25, 2024
@UNIDY2002 UNIDY2002 self-assigned this Feb 25, 2024
@84634E1A607A
Copy link
Contributor

84634E1A607A commented Feb 25, 2024

感觉不如让学校加接口 (一年一个特例谁顶得住啊)

@UNIDY2002
Copy link
Member Author

UNIDY2002 commented Feb 25, 2024

一年一个特例谁顶得住啊

夏季学期周数 10 年来还真没特例(

如果加接口,我们需要的其实是“下一个学期有几周”这样的接口,还是挺诡异的

不过倒也不重要,如果能有“这一学期有几周”这样的接口,那也已经很好了

@84634E1A607A
Copy link
Contributor

84634E1A607A commented Feb 25, 2024

EDIT: 我认为可以让学校弄一个 JSON 的校历接口

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or functionality
Projects
None yet
Development

No branches or pull requests

2 participants