Skip to content

Commit bca5b0b

Browse files
committed
Datetime fix
1 parent 96f8f69 commit bca5b0b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -507,23 +507,22 @@ import pytz
507507
### Decode
508508
```python
509509
<str> = <D/T/DT>.isoformat() # ISO string representation.
510-
<str> = <D/T/DT>.strftime('<format>') # Customized string representation.
510+
<str> = <D/T/DT>.strftime('<format>') # Custom 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 Formats
515+
### Format
516+
#### ISO:
516517
* **Date: `'YYYY-MM-DD'`.**
517518
* **Time: `'HH:MM:SS.ffffff[+<offset>]'`.**
518519
* **Datetime: `'YYYY-MM-DDTHH:MM:SS.ffffff[+<offset>]'`.**
519520

520-
521-
### Format
521+
#### Strptime, strftime:
522522
```python
523523
>>> dt = datetime.strptime('2015-05-14 23:39:00', '%Y-%m-%d %H:%M:%S')
524524
```
525525

526-
#### Rest of the codes:
527526
* **`'y'` - Year, 2 digits**
528527
* **`'b'` - Month, abbreviated name**
529528
* **`'B'` - Month, full name**

0 commit comments

Comments
 (0)