From 96f8f69152dd77e1e43755e6e316f2506b9ac01b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Fri, 15 Mar 2019 02:10:50 +0100 Subject: [PATCH] Datetime fix --- README.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 339f4a7..c21d5a1 100644 --- a/README.md +++ b/README.md @@ -495,7 +495,7 @@ import pytz ### Encode ```python - = D/T/DT.fromisoformat() # From 'YYYY-MM-DD' / 'HH:MM:SS.ffffff[+]'. + = D/T/DT.fromisoformat('') # D/T/DT from ISO string.
= DT.strptime(, '') # Datetime from string according to format. = D/DT.fromordinal() # Date or datetime from days since Christ. = D/DT.fromtimestamp() # D/DT from seconds since Epoch in local time. @@ -506,19 +506,13 @@ import pytz ### Decode ```python - = .isoformat() # 'YYYY-MM-DD' / 'HH:MM:SS.ffffff[+]'. + = .isoformat() # ISO string representation. = .strftime('') # Customized string representation. = .toordinal() # Days since Christ, ignoring time and timezone. =
.timestamp() # Seconds since Epoch in local time or tz if set. ``` -### ISO Format -```python -date == 'YYYY-MM-DD' -time == 'HH:MM:SS.ffffff[+]' -datetime == 'YYYY-MM-DDTHH:MM:SS.ffffff[+]' -``` - +### ISO Formats * **Date: `'YYYY-MM-DD'`.** * **Time: `'HH:MM:SS.ffffff[+]'`.** * **Datetime: `'YYYY-MM-DDTHH:MM:SS.ffffff[+]'`.**