Skip to main content

day-calculator-liora

一个支持“公元前 / 公元后”日期的星期计算器,纯标准库实现,无第三方依赖。

安装

pip install day-calculator-liora

用法

1. 命令行交互

day-calculator

按提示输入日期,格式为 年/月/日(公元前用负数,如 -1 表示公元前 1 年):

********************星期计算器********************
请输入日期(以年/月/日形式,用负数表示公元前年份):2024/11/27
这一天是星期三

2. 作为函数调用

from day_calculator import weekday

weekday(2024, 11, 27)   # 3  -> 星期三
weekday(-1, 1, 1)       # 6  -> 星期六

返回值约定:0 = 星期日,1 = 星期一,……,6 = 星期六。

说明

  • 闰年判定:能被 4 整除且不能被 100 整除,或能被 400 整除。
  • 全部按“前推格里高利历”计算,1582 年 10 月以前的历史日期与当时实际使用的儒略历会有差异。
  • 公元前年份内部按天文纪年换算(公元前 1 年对应天文 0 年)。

License

MIT

Metadata

Release files for day-calculator-liora 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for day-calculator-liora 0.1.0
File Size Uploaded Provenance Actions
day_calculator_liora-0.1.0.tar.gz 3.1 kB Without provenance Details for day_calculator_liora-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for day-calculator-liora 0.1.0
File Interpreter ABI Platform Actions
day_calculator_liora-0.1.0-py3-none-any.whl Python 3 none any Details for day_calculator_liora-0.1.0-py3-none-any.whl

Total release size: 6.8 kB

Release files / day_calculator_liora-0.1.0.tar.gz

Download URL day_calculator_liora-0.1.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
104529aec8b6d3a30f0dbe71ba6d78bfae5c1e2985d331d0953a25d52a1647b0
BLAKE2b-256 checksum
How to use checksums
aff9e9ab62602e6c3cbae4e054a67a6e4f466b37365b9a5bfdf70edf749d3072
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / day_calculator_liora-0.1.0-py3-none-any.whl

Download URL day_calculator_liora-0.1.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
760b64f1c60315882d003df8fd280d00435b6e4d9e7b07235526b52128655a1d
BLAKE2b-256 checksum
How to use checksums
9f63ed2d73b1de5a8dc04444e31e4f06a3b878e094b0d3b9bcdec15786cde608
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for day-calculator-liora 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page