A simple package to automatically detect and convert datetime strings to Unix timestamps
Project description
Easy DateTime
A simple Python package to automatically detect and convert datetime strings to Unix timestamps. 处理日期字符串真的是蛋疼。让我们一劳永逸地解决这个问题。
Installation
pip install easy_datetime
Usage
from easy_datetime import to_unix
# Different format examples
unix_time = to_unix("2021-01-01 00:00:00") # 1609459200
unix_time = to_unix("2021/01/01 00:00:00") # 1609459200
Features
- Automatic datetime string format detection
- Supports various date formats (YYYY-MM-DD, DD-MM-YYYY, MM/DD/YYYY, etc.)
- Returns Unix timestamp (seconds since epoch)
- Simple and easy to use
Requirements
- Python >= 3.6
- python-dateutil >= 2.8.2
License
MIT License
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
easy_datetime-0.1.0.tar.gz
(2.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easy_datetime-0.1.0.tar.gz.
File metadata
- Download URL: easy_datetime-0.1.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2b6f07094026c0ed7cd2f02dcd138be4dc7e20da3c9282142cecaa5ad37b80d
|
|
| MD5 |
8ca0b2821d2dfbc5d8bad0b20bfd3a00
|
|
| BLAKE2b-256 |
0b3ff010382149273e7d0093e062c8f53683d52aef3a0d7aecea97a07e0b7e2b
|
File details
Details for the file easy_datetime-0.1.0-py3-none-any.whl.
File metadata
- Download URL: easy_datetime-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82081c465a35d75582f7df0dbb145b8c15bc6dbeef40d96d530bdf538fd91f8b
|
|
| MD5 |
d8f6101a89fdddbffd756c8795db41af
|
|
| BLAKE2b-256 |
189017d4cc97ac6d6cc1783a066c17788407c88118aadbbebce2129e85eebe2f
|