Skip to main content

sdt.vip

sdt.vip常用的工具包, 内置大量常用工具, 正在不断增加中......

安装方法

pip install sdt.vip

使用方法

import sdt.vip

if __name__ == "__main__":

    dfx  = sdt.vip.DateTimeX()  # 可初始化 "2023-05-28 23:23:51"

    print("初始时间:", dfx)

    print("昨天的本月区间:", dfx.get("{[年-月-初||复位-1日]}~{[年-月-日]}"))

    print("昨天的去年本月区间:", dfx.get("{[年-月-初||复位-1日-1年]}~{[年-月-末]}"))

    print("昨天的上月区间:", dfx.get("{[年-月-初||复位-1日-1月]}~{[年-月-末]}"))

    print("昨天的近35天区间:", dfx.get("{[年-月-日||复位-35日]}~{[年-月-日||复位-1日]}"))

    print("前35天的日期:", dfx.get("{[年-月-日||复位-35日]}"))

    print("昨天的月1号:", dfx.get("{[年-月-初||复位-1日]}"))

    print("昨天的本月:", dfx.get("{[年-月||复位-1日]}"))


'''
# 说明:
1、分隔符“||” 左侧是获取的时间格式,右侧是时间计算的指令;
2、左左侧的字符串中通包含年、月、日、时、分、秒、初、末,用来获取时间和格式,其中“初”是获数字1,“末”最后一天的日期;
3、右侧是时间计算的指令支持年、月、日、时、分、秒、复位,用来对当前的时间进行加和减的计算,其中“复位”代表恢复到初始时间;

目前支持WINDOWS下 Python 3.6 和 3.9
联系作者:6566666@qq.com
'''

Release files for sdt.vip 1.1.2

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

Built distribution (wheel)

Table of built distributions (wheels) for sdt.vip 1.1.2
File Interpreter ABI Platform
sdt.vip-1.1.2-py3-none-any.whl Python 3 none any Details

Release files / sdt.vip-1.1.2-py3-none-any.whl

Download URL sdt.vip-1.1.2-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5be7860021f0a6881633e57d00d7afa58207da517f8de2b9cd2c1c331eb0c7fb
BLAKE2b-256 checksum
How to use checksums
9aec8a0c868ac7f7e9d04082c2fcc0a30cae75f811849535ebb48eab054074fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.16 tqdm/4.46.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.6

Release history Release notifications | RSS feed

This release

1.1.2 This release

1 release file

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