File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -507,23 +507,22 @@ import pytz
507
507
### Decode
508
508
``` python
509
509
< str > = < D/ T/ DT > .isoformat() # ISO string representation.
510
- < str > = < D/ T/ DT > .strftime(' <format>' ) # Customized string representation.
510
+ < str > = < D/ T/ DT > .strftime(' <format>' ) # Custom 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 Formats
515
+ ### Format
516
+ #### ISO:
516
517
* ** Date: ` 'YYYY-MM-DD' ` .**
517
518
* ** Time: ` 'HH:MM:SS.ffffff[+<offset>]' ` .**
518
519
* ** Datetime: ` 'YYYY-MM-DDTHH:MM:SS.ffffff[+<offset>]' ` .**
519
520
520
-
521
- ### Format
521
+ #### Strptime, strftime:
522
522
``` python
523
523
>> > dt = datetime.strptime(' 2015-05-14 23:39:00' , ' %Y-%m-%d %H:%M:%S' )
524
524
```
525
525
526
- #### Rest of the codes:
527
526
* ** ` 'y' ` - Year, 2 digits**
528
527
* ** ` 'b' ` - Month, abbreviated name**
529
528
* ** ` 'B' ` - Month, full name**
You can’t perform that action at this time.
0 commit comments