Last active
October 10, 2022 09:04
-
-
Save jippi/6a8a7ff72afa404f8ad3fba9f5521363 to your computer and use it in GitHub Desktop.
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
{% set _now = now() %} | |
====== | |
quarter_ceil={{ _now - timedelta(microseconds=_now.microsecond, seconds=_now.second, minutes=_now.minute % 15) }} | |
quarter_floor={{ _now + timedelta(microseconds=-_now.microsecond, seconds=-_now.second, minutes=15-(_now.minute % 15)) }} | |
====== | |
quarter_ceil+4h={{ _now - timedelta(microseconds=_now.microsecond, seconds=_now.second, minutes=_now.minute % 15, hours=-4) }} | |
quarter_floor+4h={{ _now + timedelta(microseconds=-_now.microsecond, seconds=-_now.second, minutes=15-(_now.minute % 15), hours=4) }} |
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
{% set _now = now() %} | |
====== | |
quarter_ceil={{ | |
_now - timedelta( | |
microseconds=_now.microsecond, | |
seconds=_now.second, | |
minutes=_now.minute % 15 | |
) | |
}} | |
quarter_floor={{ _now + timedelta( | |
microseconds=-_now.microsecond, | |
seconds=-_now.second, | |
minutes=15-(_now.minute % 15) | |
) | |
}} | |
====== | |
quarter_ceil+4h={{ | |
_now - timedelta( | |
microseconds=_now.microsecond, | |
seconds=_now.second, | |
minutes=_now.minute % 15, | |
hours=-4 | |
) | |
}} | |
quarter_floor+4h={{ _now + timedelta( | |
microseconds=-_now.microsecond, | |
seconds=-_now.second, | |
minutes=15-(_now.minute % 15), | |
hours=4 | |
) | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment