Skip to content

Commit 2ed74a5

Browse files
committed
Reverted datetime
1 parent a4d38c8 commit 2ed74a5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -473,12 +473,12 @@ from dateutil.tz import UTC, tzlocal, gettz
473473
<TD> = timedelta(days=0, seconds=0, microseconds=0, milliseconds=0,
474474
minutes=0, hours=0, weeks=0)
475475
```
476-
* **Use `'<D|DT>.weekday()'` to get the day of the week (Mon == 0).**
476+
* **Use `'<D/DT>.weekday()'` to get the day of the week (Mon == 0).**
477477
* **`'fold=1'` means second pass in case of time jumping back for one hour.**
478478

479479
### Now
480480
```python
481-
<D|DTn> = D|DT.today() # Current local date or naive datetime.
481+
<D/DTn> = D/DT.today() # Current local date or naive datetime.
482482
<DTn> = DT.utcnow() # Naive datetime from current UTC time.
483483
<DTa> = DT.now(<tz>) # Aware datetime from current tz time.
484484
```
@@ -492,24 +492,24 @@ from dateutil.tz import UTC, tzlocal, gettz
492492

493493
```python
494494
<DTa> = <DT>.astimezone(<tz>) # Datetime, converted to passed timezone.
495-
<Ta|DTa> = <T|DT>.replace(tzinfo=<tz>) # Unconverted object with new timezone.
495+
<Ta/DTa> = <T/DT>.replace(tzinfo=<tz>) # Unconverted object with new timezone.
496496
```
497497

498498
### Encode
499499
```python
500-
<D|T|DT> = D|T|DT.fromisoformat('<iso>') # Object from ISO string.
500+
<D/T/DT> = D/T/DT.fromisoformat('<iso>') # Object from ISO string.
501501
<DT> = DT.strptime(<str>, '<format>') # Datetime from str, according to format.
502-
<D|DTn> = D|DT.fromordinal(<int>) # D|DTn from days since Christ.
502+
<D/DTn> = D/DT.fromordinal(<int>) # D/DTn from days since Christ.
503503
<DTa> = DT.fromtimestamp(<real>, <tz>) # DTa from seconds since Epoch in tz time.
504504
```
505505
* **ISO strings come in following forms: `'YYYY-MM-DD'`, `'HH:MM:SS.ffffff[±<offset>]'`, or both separated by `'T'`.**
506506
* **On Unix systems Epoch is `'1970-01-01 00:00 UTC'`, `'1970-01-01 01:00 CET'`, ...**
507507

508508
### Decode
509509
```python
510-
<str> = <D|T|DT>.isoformat() # ISO string representation.
511-
<str> = <D|T|DT>.strftime('<format>') # Custom string representation.
512-
<int> = <D|DT>.toordinal() # Days since Christ, ignoring time and tz.
510+
<str> = <D/T/DT>.isoformat() # ISO string representation.
511+
<str> = <D/T/DT>.strftime('<format>') # Custom string representation.
512+
<int> = <D/DT>.toordinal() # Days since Christ, ignoring time and tz.
513513
<float> = <DT>.timestamp() # Seconds since Epoch in local time or tz.
514514
```
515515

0 commit comments

Comments
 (0)