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.2.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.2.0
File Size Uploaded
ticktock_utils-0.2.0.tar.gz 7.0 kB Details

Built distribution (wheel)

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

Total release size: 12.0 kB

Release files / ticktock_utils-0.2.0.tar.gz

Download URL ticktock_utils-0.2.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6327c63b14942e56d3eeaae3d600a48232b0debeebe4ffa2bd67ab255eefe38c
BLAKE2b-256 checksum
How to use checksums
f7beabe42432d6e8fc56da0cde3f0ca396311dab6ffd583159f0c229279767b8
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.2.0-py3-none-any.whl

Download URL ticktock_utils-0.2.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
198e000b2f47d644b0596781c17e53fa84704a91c18c20aec6125ce7c260c9f1
BLAKE2b-256 checksum
How to use checksums
cfe32e525b953d5d26111b40c134cd25f3c077de143f0ac4654e4471ff79846a
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

0.3.0

2 release files

This release

0.2.0 This release

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