module View.Date ( renderDate ) where import Date exposing (..) import Model.Translations exposing (..) renderDate : Date -> Translations -> String renderDate date translations = let params = [ toString (Date.day date) , (getMessage (getMonthKey (Date.month date)) translations) , toString (Date.year date) ] in getVarMessage params "Date" translations getMonthKey : Month -> String getMonthKey month = case month of Jan -> "January" Feb -> "February" Mar -> "March" Apr -> "April" May -> "May" Jun -> "June" Jul -> "July" Aug -> "August" Sep -> "September" Oct -> "October" Nov -> "November" Dec -> "December"