Created
June 6, 2018 14:24
-
-
Save su-narthur/1473c4209cacf663604e65e893e70517 to your computer and use it in GitHub Desktop.
Use SUFramework API to display sunset times
This file contains 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 dayOfWeekIndex = date()|date("N") %} | |
{% if dayOfWeekIndex == 5 %} | |
Sunset tonight: {{ su.calendar.sunsetTime|date( "H:i:s" ) }}<br> | |
Sunset tomorrow: {{ su.calendar.sunsetTime( '+1 day' )|date( "H:i:s" ) }}<br> | |
{% elseif dayOfWeekIndex == 6 %} | |
Sunset tonight: {{ su.calendar.sunsetTime|date( "H:i:s" ) }}<br> | |
Sunset next Friday: {{ su.calendar.sunsetTime( 'next friday' )|date( "H:i:s" ) }}<br> | |
Sunset next Sabbath: {{ su.calendar.sunsetTime( 'next saturday' )|date( "H:i:s" ) }}<br> | |
{% else %} | |
Sunset next Friday: {{ su.calendar.sunsetTime( 'next friday' )|date( "H:i:s" ) }}<br> | |
Sunset next Sabbath: {{ su.calendar.sunsetTime( 'next saturday' )|date( "H:i:s" ) }}<br> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment