wrapper for timelib
Project description
Fork of: https://github.com/pediapress/timelib/
Usage
strtotime is a short wrapper around php’s internal timelib module. It currently only provides a few functions:
strtotime.strtodatetime:
>>> strtotime.strtodatetime('today') datetime.datetime(2009, 6, 23, 0, 0) >>> strtotime.strtodatetime('today') datetime.datetime(2009, 6, 23, 0, 0) >>> strtotime.strtodatetime('next friday') datetime.datetime(2009, 6, 26, 0, 0) >>> strtotime.strtodatetime('29 feb 2008 -108 years') datetime.datetime(1900, 3, 1, 0, 0)
strtotime.strtotime:
>>> import time, strtotime >>> time.ctime(strtotime.strtotime("now")) 'Tue Jun 23 15:17:32 2009' >>> time.ctime(strtotime.strtotime("4 hours ago")) 'Tue Jun 23 11:17:38 2009' >>> time.ctime(strtotime.strtotime("20080229 -1 year")) 'Thu Mar 1 01:00:00 2007'
License
lib contains unmodified sources from the php source distribution. These are distributed under the php license, version 3.01.
The remaining part is distributed under the zlib/libpng license:
Copyright (c) 2009-2011 PediaPress GmbH
This software is provided ‘as-is’, without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
This notice may not be removed or altered from any source distribution.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for strtotime-1.0.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dcccb086f0da85ddb0cb06a1c48833ee0a461943d3358448cfc034796c45ae2 |
|
MD5 | 3dbdac7e4d0bbcc23b8bbdc7661c376b |
|
BLAKE2b-256 | 2c2a37c0680b8a4d426018e7a9b11337a08458fb19d447d437e6ee3736869510 |
Hashes for strtotime-1.0.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 297b65c00f540fc5fb1b4ebf321d8739acb4385fe976553d17add7ad7917008a |
|
MD5 | 5213f81bdd84a2c5d2c6ff0e74de9828 |
|
BLAKE2b-256 | aca475e9d19ad29cec6ee0ea376c3d394cb27a15b1d35752ca693cc864accef6 |
Hashes for strtotime-1.0.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b371b2c5a5ac276c0161f05cb009b873c7a02d841e6be07fdbdc2d794dc6be7 |
|
MD5 | 2ce7764afed6d47582b9538da5e2c143 |
|
BLAKE2b-256 | 7d714a4bdeaf1a585c81e6fabf189aeaf0e2c6f2623fabb3ba27e4594916eb5f |
Hashes for strtotime-1.0.4-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d23633898eb92dc24b794b097ee01c87ddd4559681b1394b1fc460376e41db6 |
|
MD5 | 2eb95fc5adc6bff85b57e17b41766ba3 |
|
BLAKE2b-256 | 16d95d16573e00c729e777f82f0e8315ba4bff18dfe311702b4a4207a4fb9351 |
Hashes for strtotime-1.0.4-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c96085bd18b95a6aeb84b8df06f033eb5da5aee572165d753bc956bcd96a007b |
|
MD5 | eb9c9a614cb06cf2dd6586a42900c8c3 |
|
BLAKE2b-256 | a994fb2d87749083c2fee91684fc401c4cd9b30ef9d8eb9d93d49411a5eea023 |