File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -495,7 +495,7 @@ import pytz
495
495
496
496
### Encode
497
497
``` python
498
- < D/ T/ DT > = D/ T/ DT .fromisoformat(< str > ) # From 'YYYY-MM-DD' / 'HH:MM:SS.ffffff[+<offset>]' .
498
+ < D/ T/ DT > = D/ T/ DT .fromisoformat(' <iso> ' ) # D/T/DT from ISO string .
499
499
< DT > = DT .strptime(< str > , ' <format>' ) # Datetime from string according to format.
500
500
< D/ DTn> = D/ DT .fromordinal(< int > ) # Date or datetime from days since Christ.
501
501
< D/ DTn> = D/ DT .fromtimestamp(< real> ) # D/DT from seconds since Epoch in local time.
@@ -506,19 +506,13 @@ import pytz
506
506
507
507
### Decode
508
508
``` python
509
- < str > = < D/ T/ DT > .isoformat() # 'YYYY-MM-DD' / 'HH:MM:SS.ffffff[+<offset>]' .
509
+ < str > = < D/ T/ DT > .isoformat() # ISO string representation .
510
510
< str > = < D/ T/ DT > .strftime(' <format>' ) # Customized string representation.
511
511
< int > = < D/ DT > .toordinal() # Days since Christ, ignoring time and timezone.
512
512
< float > = < DT > .timestamp() # Seconds since Epoch in local time or tz if set.
513
513
```
514
514
515
- ### ISO Format
516
- ``` python
517
- date == ' YYYY-MM-DD'
518
- time == ' HH:MM:SS.ffffff[+<offset>]'
519
- datetime == ' YYYY-MM-DDTHH:MM:SS.ffffff[+<offset>]'
520
- ```
521
-
515
+ ### ISO Formats
522
516
* ** Date: ` 'YYYY-MM-DD' ` .**
523
517
* ** Time: ` 'HH:MM:SS.ffffff[+<offset>]' ` .**
524
518
* ** Datetime: ` 'YYYY-MM-DDTHH:MM:SS.ffffff[+<offset>]' ` .**
You can’t perform that action at this time.
0 commit comments