企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
Delorean让你在Python中处理时间更容易。时间不应该是一个大问题,delorean希望让你能够更容易地处理时间。 Delorean基于pytz和dateutil构建。 Delorean让处理时间的语句更接近自然语言,对于时间对象的抽象也更直观。这个项目的核心目标就是改善时间处理的代码。 ## 安装 ``` pip install delorean ``` ``` rom delorean import Delorean d = Delorean() print(d.next_day(100).humanize()) print(d.next_sunday().humanize()) ``` ## 处理等距时间点 ``` import delorean d = delorean.Delorean() for stop in delorean.stops(freq=delorean.HOURLY,count=1,timezone="Asia/Shanghai"): print(stop.humanize()) print(stop) ```