Skip to main content

ticktock_utils

一个超级简单、轻量级的 Python 时间处理库。支持年月日、时分秒的获取,还自带贴心的报错机制

🚀 为什么要有它?

因为 Python 自带的 datetime 模块对新手来说太庞大了,我专门做了这个库,让你用最简单的方式拿到时间,并且不用担心输错数字

📦 安装

pip install my_time

## Quick Start
import my_time

# 1. 拿到今天的年月日
year, month, day = my_time.get_ymd()
print(f"今天是 {year} 年 {month} 月 {day} 日")

# 2. 拿到当前的时分秒
hour, minute, second = my_time.get_hms()
print(f"现在是 {hour}:{minute}:{second}")

# 3. 拿到一个“完美”的日期字符串
date_str = my_time.format_date("%Y年%m月%d日")
print(date_str)

Release files for ticktock-utils 0.3.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 ticktock-utils 0.3.0
File Size Uploaded
ticktock_utils-0.3.0.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ticktock-utils 0.3.0
File Interpreter ABI Platform
ticktock_utils-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 kB

Release files / ticktock_utils-0.3.0.tar.gz

Download URL ticktock_utils-0.3.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
20a99c2d000deb2e42b396a92e37bb5b65e17ea8134acd469c3324710758f4b2
BLAKE2b-256 checksum
How to use checksums
b12eddcdf4fe7ac4be8d8d8f5a364ba983724e216269d41118c3bcfa35077aa6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / ticktock_utils-0.3.0-py3-none-any.whl

Download URL ticktock_utils-0.3.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
927db6251ed127cf9a40513deba66ef4133f8e8a06fe54637beae3dfccc2d22e
BLAKE2b-256 checksum
How to use checksums
83a7fb1fa14734a1ec3ca2300f975cf9bd0cf2789cd5d771ec5a1d1a55c1071a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

This release

0.3.0 This release

2 release files

0.2.0

2 release files

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