# Sunrise and sunset
# SPDX-License-Identifier: GPL-2.0-only

# Localize if we can
IF access($SysInclude + "/translations/" + _("LANGID") + "/sun.rem", "r") >= 0
    SYSINCLUDE translations/[_("LANGID")]/sun.rem
ENDIF

PUSH-VARS sr ss
SET sr sunrise()
SET ss sunset()

IF !$CalMode && !$PsCal
    IF typeof(sr) == "TIME"
        REM INFO "Url: https://en.wikipedia.org/wiki/Sunrise" NOQUEUE AT [sr] MSG %"%"%(Sunrise) %! %2.
    ENDIF
    IF typeof(ss) == "TIME"
        REM INFO "Url: https://en.wikipedia.org/wiki/Sunset" NOQUEUE AT [ss] MSG %"%"%(Sunset) %! %2.
    ENDIF
ENDIF

POP-VARS