Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Happy Birthday
import Signal
import Time exposing (every, second)
import Date exposing (..)
import Graphics.Element exposing (show)
currentTime t =
let date' = fromTime t
sameMonth = Jun == (month date')
sameDay = 11 == (day date')
in
if sameMonth && sameDay then show "Buon Compleanno!" else show "Happy Birthday! (PS. in Inghilterra e' appena passata la mezzanotte)"
main = Signal.map currentTime (Time.every Time.second)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.