@@ -473,12 +473,12 @@ from dateutil.tz import UTC, tzlocal, gettz
473
473
< TD > = timedelta(days = 0 , seconds = 0 , microseconds = 0 , milliseconds = 0 ,
474
474
minutes = 0 , hours = 0 , weeks = 0 )
475
475
```
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).**
477
477
* ** ` 'fold=1' ` means second pass in case of time jumping back for one hour.**
478
478
479
479
### Now
480
480
``` 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.
482
482
< DTn> = DT .utcnow() # Naive datetime from current UTC time.
483
483
< DTa> = DT .now(< tz> ) # Aware datetime from current tz time.
484
484
```
@@ -492,24 +492,24 @@ from dateutil.tz import UTC, tzlocal, gettz
492
492
493
493
``` python
494
494
< 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.
496
496
```
497
497
498
498
### Encode
499
499
``` 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.
501
501
< 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.
503
503
< DTa> = DT .fromtimestamp(< real> , < tz> ) # DTa from seconds since Epoch in tz time.
504
504
```
505
505
* ** ISO strings come in following forms: ` 'YYYY-MM-DD' ` , ` 'HH:MM:SS.ffffff[±<offset>]' ` , or both separated by ` 'T' ` .**
506
506
* ** On Unix systems Epoch is ` '1970-01-01 00:00 UTC' ` , ` '1970-01-01 01:00 CET' ` , ...**
507
507
508
508
### Decode
509
509
``` 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.
513
513
< float > = < DT > .timestamp() # Seconds since Epoch in local time or tz.
514
514
```
515
515
0 commit comments