This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| A replacement for #each that provides an index value (and other helpful values) for each iteration. | |
| Unless using `foo in bar` format, the item at each iteration will be accessible via the `item` variable. | |
| Simple Example | |
| -------------- | |
| ``` | |
| {{#eachIndexed bar in foo}} | |
| {{index}} - {{bar}} | |
| {{/#eachIndexed}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ###################################################################### | |
| # CURRENT AWARE LOCAL DATETIME | |
| ###################################################################### | |
| from datetime import datetime | |
| from tzlocal import get_localzone | |
| local_tz = get_localzone() | |
| local_dt = datetime.now(local_tz) |