diff --git a/README.md b/README.md index 19af2df..e095528 100644 --- a/README.md +++ b/README.md @@ -473,12 +473,12 @@ from dateutil.tz import UTC, tzlocal, gettz = timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0) ``` -* **Use `'.weekday()'` to get the day of the week (Mon == 0).** +* **Use `'.weekday()'` to get the day of the week (Mon == 0).** * **`'fold=1'` means second pass in case of time jumping back for one hour.** ### Now ```python - = D/DT.today() # Current local date or naive datetime. + = D|DT.today() # Current local date or naive datetime. = DT.utcnow() # Naive datetime from current UTC time. = DT.now() # Aware datetime from current tz time. ``` @@ -492,14 +492,14 @@ from dateutil.tz import UTC, tzlocal, gettz ```python =
.astimezone() # Datetime, converted to passed timezone. - = .replace(tzinfo=) # Unconverted object with new timezone. + = .replace(tzinfo=) # Unconverted object with new timezone. ``` ### Encode ```python - = D/T/DT.fromisoformat('') # Object from ISO string. + = D|T|DT.fromisoformat('') # Object from ISO string.
= DT.strptime(, '') # Datetime from str, according to format. - = D/DT.fromordinal() # D/DTn from days since Christ. + = D|DT.fromordinal() # D|DTn from days since Christ. = DT.fromtimestamp(, ) # DTa from seconds since Epoch in tz time. ``` * **ISO strings come in following forms: `'YYYY-MM-DD'`, `'HH:MM:SS.ffffff[±]'`, or both separated by `'T'`.** @@ -507,9 +507,9 @@ from dateutil.tz import UTC, tzlocal, gettz ### Decode ```python - = .isoformat() # ISO string representation. - = .strftime('') # Custom string representation. - = .toordinal() # Days since Christ, ignoring time and tz. + = .isoformat() # ISO string representation. + = .strftime('') # Custom string representation. + = .toordinal() # Days since Christ, ignoring time and tz. =
.timestamp() # Seconds since Epoch in local time or tz. ```