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.5-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4969977d09a3a01f25abc8bb70a3c5ca08329318eaa90bed7743a59ccba3feae |
|
MD5 | 6ebbb2f6670a27eb8b2667f974698171 |
|
BLAKE2b-256 | af7b82f68f50f2f6d2c238781c07b72fa00ac30a6af91c49462f17d044ea8cb0 |
Hashes for strtotime-1.0.5-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0438d5fe77b7e43cf330c5c3864f05fdc6e3de4daf0c8030405d59f15afe8a5e |
|
MD5 | ba1b9e8d10f79ca01472a0f739a209db |
|
BLAKE2b-256 | 9f2f309f01c5d4f70e9f225b599af224cb09035f0d25d452bfca19d648e8ff88 |
Hashes for strtotime-1.0.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60f404ee53b44429ca3c30e73ffadf6449de22d512c22e4440bf3831365ab1bd |
|
MD5 | 35fc6e6e828eff2695c328b6abd68307 |
|
BLAKE2b-256 | f4cd6220c232fefd81bfc091faae7b4d3ee14e54c95418c7d08831c58395e18d |
Hashes for strtotime-1.0.5-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd3d6edae941aa13528e08b6c2369ee6736759223ed35975d3de5fb96dcbbba8 |
|
MD5 | 23e23e2d016698f03f4e3c9be7f2ae44 |
|
BLAKE2b-256 | 97b850bdd9ad78a883ccfa2aca0ca6097a7dafd47d863ca0c74ae2b771cc050e |
Hashes for strtotime-1.0.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b15c1c308e7a9e63436a6534141e33876ba977b339aef3961c9bdbc96434281 |
|
MD5 | e97455974315c578dd96f10e7cf38a74 |
|
BLAKE2b-256 | 89b5da407634427edf01a4ee01e1c3946de594d8ff3688b16024843a5e620587 |
Hashes for strtotime-1.0.5-cp37-cp37m-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 471eef8ea361d259e963f6ba0d9b281fa169437b5d26a8972d9175a10849b864 |
|
MD5 | 0dce6af0e51e8b039bd61117f0b302ff |
|
BLAKE2b-256 | 78c8ac07d2ff09c25addd9aa1a177b8dce7d076561fdd159ab0608465815dd17 |
Hashes for strtotime-1.0.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21daffffdb44b3dc5100f531ceaef1287b0ac936321e68120cf28a0fbb132530 |
|
MD5 | a04212eccbf16488d66149b64f65a676 |
|
BLAKE2b-256 | 79ce93a1b18fd09c914b8ad3b8859d8c90fd8b254429b1f3fb647e9cbcd51a20 |
Hashes for strtotime-1.0.5-cp36-cp36m-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18d5bed986825bce9d2911c1479d053dfac20ffa97cd7051b05656e25db6207f |
|
MD5 | cab6c47279ab4fff5466fc170be0de28 |
|
BLAKE2b-256 | 21ed24c4a31852f63874cd4f4fca459e5adf5d74a5673279d9c06358cb9a9518 |
Hashes for strtotime-1.0.5-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa08e1ebf08e483d639018c5bc83d5885ba0abb136bcb28ab4e5aa7ce7daaf43 |
|
MD5 | bff222e6a458a9b13974d86297ffc92d |
|
BLAKE2b-256 | 7902cc6213692bb6b2bcaf181dfa570b91fb526394049b95bd2025a2a0bbd821 |
Hashes for strtotime-1.0.5-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e057348fb9ecdb8491e9dc76f369c446a20cf168790f141dbb0ff40585e4557 |
|
MD5 | 171fe9799f9733692c30c157041a2186 |
|
BLAKE2b-256 | 305832af3707a66d9fcbdada2fb1ca42b7ad8ac4c1b4420827f4cda5b61a3171 |