sdt.vip


Namesdt.vip JSON
Version 1.1.2 PyPI version JSON
download
home_pagehttps://sdt.vip/example
Summarycns工具包
upload_time2024-06-09 02:29:53
maintainerNone
docs_urlNone
authorRambo
requires_python>=3.6
licenseCopyright (C) 2023 CNS. All Rights Reserved. See LICENSE for license.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## sdt.vip
sdt.vip常用的工具包, 内置大量常用工具, 正在不断增加中......


## 安装方法
pip install sdt.vip


## 使用方法
```python代码
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
'''



            

Raw data

            {
    "_id": null,
    "home_page": "https://sdt.vip/example",
    "name": "sdt.vip",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Rambo",
    "author_email": "6566666@qq.com",
    "download_url": null,
    "platform": null,
    "description": "## sdt.vip\nsdt.vip\u5e38\u7528\u7684\u5de5\u5177\u5305, \u5185\u7f6e\u5927\u91cf\u5e38\u7528\u5de5\u5177, \u6b63\u5728\u4e0d\u65ad\u589e\u52a0\u4e2d......\n\n\n## \u5b89\u88c5\u65b9\u6cd5\npip install sdt.vip\n\n\n## \u4f7f\u7528\u65b9\u6cd5\n```python\u4ee3\u7801\nimport sdt.vip\n\nif __name__ == \"__main__\":\n\n    dfx  = sdt.vip.DateTimeX()  # \u53ef\u521d\u59cb\u5316 \"2023-05-28 23:23:51\"\n\n    print(\"\u521d\u59cb\u65f6\u95f4:\", dfx)\n\n    print(\"\u6628\u5929\u7684\u672c\u6708\u533a\u95f4:\", dfx.get(\"{[\u5e74-\u6708-\u521d||\u590d\u4f4d-1\u65e5]}~{[\u5e74-\u6708-\u65e5]}\"))\n\n    print(\"\u6628\u5929\u7684\u53bb\u5e74\u672c\u6708\u533a\u95f4:\", dfx.get(\"{[\u5e74-\u6708-\u521d||\u590d\u4f4d-1\u65e5-1\u5e74]}~{[\u5e74-\u6708-\u672b]}\"))\n\n    print(\"\u6628\u5929\u7684\u4e0a\u6708\u533a\u95f4:\", dfx.get(\"{[\u5e74-\u6708-\u521d||\u590d\u4f4d-1\u65e5-1\u6708]}~{[\u5e74-\u6708-\u672b]}\"))\n\n    print(\"\u6628\u5929\u7684\u8fd135\u5929\u533a\u95f4:\", dfx.get(\"{[\u5e74-\u6708-\u65e5||\u590d\u4f4d-35\u65e5]}~{[\u5e74-\u6708-\u65e5||\u590d\u4f4d-1\u65e5]}\"))\n\n    print(\"\u524d35\u5929\u7684\u65e5\u671f:\", dfx.get(\"{[\u5e74-\u6708-\u65e5||\u590d\u4f4d-35\u65e5]}\"))\n\n    print(\"\u6628\u5929\u7684\u67081\u53f7:\", dfx.get(\"{[\u5e74-\u6708-\u521d||\u590d\u4f4d-1\u65e5]}\"))\n\n    print(\"\u6628\u5929\u7684\u672c\u6708:\", dfx.get(\"{[\u5e74-\u6708||\u590d\u4f4d-1\u65e5]}\"))\n\n\n'''\n# \u8bf4\u660e\uff1a\n1\u3001\u5206\u9694\u7b26\u201c||\u201d \u5de6\u4fa7\u662f\u83b7\u53d6\u7684\u65f6\u95f4\u683c\u5f0f\uff0c\u53f3\u4fa7\u662f\u65f6\u95f4\u8ba1\u7b97\u7684\u6307\u4ee4\uff1b\n2\u3001\u5de6\u5de6\u4fa7\u7684\u5b57\u7b26\u4e32\u4e2d\u901a\u5305\u542b\u5e74\u3001\u6708\u3001\u65e5\u3001\u65f6\u3001\u5206\u3001\u79d2\u3001\u521d\u3001\u672b\uff0c\u7528\u6765\u83b7\u53d6\u65f6\u95f4\u548c\u683c\u5f0f\uff0c\u5176\u4e2d\u201c\u521d\u201d\u662f\u83b7\u6570\u5b571\uff0c\u201c\u672b\u201d\u6700\u540e\u4e00\u5929\u7684\u65e5\u671f\uff1b\n3\u3001\u53f3\u4fa7\u662f\u65f6\u95f4\u8ba1\u7b97\u7684\u6307\u4ee4\u652f\u6301\u5e74\u3001\u6708\u3001\u65e5\u3001\u65f6\u3001\u5206\u3001\u79d2\u3001\u590d\u4f4d\uff0c\u7528\u6765\u5bf9\u5f53\u524d\u7684\u65f6\u95f4\u8fdb\u884c\u52a0\u548c\u51cf\u7684\u8ba1\u7b97\uff0c\u5176\u4e2d\u201c\u590d\u4f4d\u201d\u4ee3\u8868\u6062\u590d\u5230\u521d\u59cb\u65f6\u95f4\uff1b\n\n\u76ee\u524d\u652f\u6301WINDOWS\u4e0b Python 3.6 \u548c 3.9\n\u8054\u7cfb\u4f5c\u8005\uff1a6566666@qq.com\n'''\n\n\n",
    "bugtrack_url": null,
    "license": "Copyright (C) 2023 CNS. All Rights Reserved. See LICENSE for license.",
    "summary": "cns\u5de5\u5177\u5305",
    "version": "1.1.2",
    "project_urls": {
        "Homepage": "https://sdt.vip/example"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9aec8a0c868ac7f7e9d04082c2fcc0a30cae75f811849535ebb48eab054074fa",
                "md5": "14257ddef71d4a50954f02db9a1507f5",
                "sha256": "5be7860021f0a6881633e57d00d7afa58207da517f8de2b9cd2c1c331eb0c7fb"
            },
            "downloads": -1,
            "filename": "sdt.vip-1.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "14257ddef71d4a50954f02db9a1507f5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6057,
            "upload_time": "2024-06-09T02:29:53",
            "upload_time_iso_8601": "2024-06-09T02:29:53.622541Z",
            "url": "https://files.pythonhosted.org/packages/9a/ec/8a0c868ac7f7e9d04082c2fcc0a30cae75f811849535ebb48eab054074fa/sdt.vip-1.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-09 02:29:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "sdt.vip"
}
        
Elapsed time: 0.25720s