Skip to content

Commit 96f8f69

Browse files
committed
Datetime fix
1 parent 491c927 commit 96f8f69

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ import pytz
495495

496496
### Encode
497497
```python
498-
<D/T/DT> = D/T/DT.fromisoformat(<str>) # From 'YYYY-MM-DD' / 'HH:MM:SS.ffffff[+<offset>]'.
498+
<D/T/DT> = D/T/DT.fromisoformat('<iso>') # D/T/DT from ISO string.
499499
<DT> = DT.strptime(<str>, '<format>') # Datetime from string according to format.
500500
<D/DTn> = D/DT.fromordinal(<int>) # Date or datetime from days since Christ.
501501
<D/DTn> = D/DT.fromtimestamp(<real>) # D/DT from seconds since Epoch in local time.
@@ -506,19 +506,13 @@ import pytz
506506

507507
### Decode
508508
```python
509-
<str> = <D/T/DT>.isoformat() # 'YYYY-MM-DD' / 'HH:MM:SS.ffffff[+<offset>]'.
509+
<str> = <D/T/DT>.isoformat() # ISO string representation.
510510
<str> = <D/T/DT>.strftime('<format>') # Customized string representation.
511511
<int> = <D/DT>.toordinal() # Days since Christ, ignoring time and timezone.
512512
<float> = <DT>.timestamp() # Seconds since Epoch in local time or tz if set.
513513
```
514514

515-
### ISO Format
516-
```python
517-
date == 'YYYY-MM-DD'
518-
time == 'HH:MM:SS.ffffff[+<offset>]'
519-
datetime == 'YYYY-MM-DDTHH:MM:SS.ffffff[+<offset>]'
520-
```
521-
515+
### ISO Formats
522516
* **Date: `'YYYY-MM-DD'`.**
523517
* **Time: `'HH:MM:SS.ffffff[+<offset>]'`.**
524518
* **Datetime: `'YYYY-MM-DDTHH:MM:SS.ffffff[+<offset>]'`.**

0 commit comments

Comments
 (0)