Browse Source

Datetime fix

pull/28/head
Jure Šorn 5 years ago
parent
commit
91b55481cf
1 changed files with 2 additions and 5 deletions
  1. 7
      README.md

7
README.md

@ -513,16 +513,13 @@ import pytz
### Format
```python
>>> dt = datetime.strptime('2015-05-14 23:39:00', '%Y-%m-%d %H:%M:%S')
>>> dt.strftime("%dth %B '%y %A %I%p")
"14th May '15 Thursday 11PM"
```
#### Rest of the codes:
* **`'y'` - Year, 2 digits.**
* **`'b'` - Month, abbreviated name.**
* **`'B'` - Month, full name.**
* **`'a'` - Weekday, abbreviated name.**
* **`'A'` - Weekday, full name.**
* **`'I'` - Hours, 2 digits, 12 hours.**
* **`'p'` - AM/PM.**
* **`'f'` - Microseconds, 6 digits.**
* **`'z'` - Timezone offset, ± and 4 digits.**
* **`'Z'` - Timezone name.**

Loading…
Cancel
Save