Skip to content

Instantly share code, notes, and snippets.

@doppioslash
Created June 11, 2015 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doppioslash/255f4f6d475a74dae36a to your computer and use it in GitHub Desktop.
Save doppioslash/255f4f6d475a74dae36a to your computer and use it in GitHub Desktop.
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