Skip to content

Commit 91b5548

Browse files
committed
Datetime fix
1 parent ce969e2 commit 91b5548

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -513,16 +513,13 @@ import pytz
513513
### Format
514514
```python
515515
>>> dt = datetime.strptime('2015-05-14 23:39:00', '%Y-%m-%d %H:%M:%S')
516+
>>> dt.strftime("%dth %B '%y %A %I%p")
517+
"14th May '15 Thursday 11PM"
516518
```
517519

518520
#### Rest of the codes:
519-
* **`'y'` - Year, 2 digits.**
520521
* **`'b'` - Month, abbreviated name.**
521-
* **`'B'` - Month, full name.**
522522
* **`'a'` - Weekday, abbreviated name.**
523-
* **`'A'` - Weekday, full name.**
524-
* **`'I'` - Hours, 2 digits, 12 hours.**
525-
* **`'p'` - AM/PM.**
526523
* **`'f'` - Microseconds, 6 digits.**
527524
* **`'z'` - Timezone offset, ± and 4 digits.**
528525
* **`'Z'` - Timezone name.**

0 commit comments

Comments
 (0)