跳转到主要内容

Python模块,用于判断datetime是否在时间范围内

项目描述

Python模块,用于判断datetime是否在时间范围内。

基于Paul Boyd编写的原始TimePeriod模块 <boyd.paul2@gmail.com>。

安装

$ sudo pip install timeperiod2

用法

import datetime
import timeperiod
# will return True iff we have Monday, Tuesday or Thursday:
timeperiod.in_period('wd {mon tue thu}')
# will return True iff we have "office time"
timeperiod.in_period('wd {Mon-Fri} hr {9-17}', datetime.datetime.now())

许可证

在LGPL下发布

https://gnu.ac.cn/licenses/#LGPL

也请参阅LICENSE文件。

项目详情


下载文件

下载适合您平台的应用程序文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源代码发行版

此版本没有可用的源代码发行版文件。请参阅生成发行版存档的教程

构建发行版

timeperiod2-20.10.0-py3-none-any.whl (14.0 kB 查看哈希值)

上传时间: Python 3

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面