Format dates the way that God intended
This commit is contained in:
parent
5a3ef2f83e
commit
da0358b9ea
@ -14,7 +14,7 @@ module View.Common
|
||||
)
|
||||
|
||||
import Date
|
||||
import Date.Extra.Config.Config_en_au as DateEn
|
||||
import Date.Extra.Config.Config_en_us as DateEn
|
||||
import Date.Extra.Format as DateFormat
|
||||
import Html exposing (..)
|
||||
import Html.Attributes exposing (..)
|
||||
@ -178,4 +178,4 @@ formatDate : String -> String
|
||||
formatDate dateString =
|
||||
Date.fromString dateString
|
||||
|> Result.withDefault (Date.fromTime 0)
|
||||
|> DateFormat.format DateEn.config "%d/%m/%Y %H:%M"
|
||||
|> DateFormat.format DateEn.config "%Y-%m-%d %H:%M"
|
||||
|
Loading…
Reference in New Issue
Block a user