Browse Source

Datetime fix

pull/28/head
Jure Šorn 6 years ago
parent
commit
1aca3fc2df
1 changed files with 6 additions and 6 deletions
  1. 12
      README.md

12
README.md

@ -456,8 +456,8 @@ from itertools import product, combinations, combinations_with_replacement, perm
Datetime Datetime
-------- --------
* **Module Datetime provides Date (`<D>`), Time (`<T>`) and Datetime (`<DT>`) classes.**
* **Time and Datetime can be 'aware' (`<a>`), meaning they have defined timezone, or 'naive' (`<n>`), meaning they don't.**
* **Module Datetime provides 'date' `<D>`, 'time' `<T>` and 'datetime' `<DT>` classes.**
* **Time and datetime can be 'aware' `<a>`, meaning they have defined timezone, or 'naive' `<n>`, meaning they don't.**
```python ```python
# $ pip3 install pytz # $ pip3 install pytz
@ -467,10 +467,10 @@ import pytz
### Constructors ### Constructors
```python ```python
<date> = date(year, month, day)
<time> = time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, fold=0)
<datetime> = datetime(year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, fold=0)
<timedelta> = timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)
<D> = date(year, month, day)
<T> = time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, fold=0)
<DT> = datetime(year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, fold=0)
<TD> = timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)
``` ```
* **`'fold=1'` means second pass in case of time jumping back for one hour.** * **`'fold=1'` means second pass in case of time jumping back for one hour.**
* **Use `'<D/DT>.weekday()'` to get day of the week (Mon == 0).** * **Use `'<D/DT>.weekday()'` to get day of the week (Mon == 0).**

Loading…
Cancel
Save