Просмотр исходного кода

a tiny bit of docs for PrettyDate

which maybe should be RelativeDate? or maybe even RelativeTime, because
it isn't concerned with dates at all. mhh...
Lucas Stadler лет назад: 11
Родитель
Сommit
decd8e4db4
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      elm/PrettyDate.elm

+ 6 - 0
elm/PrettyDate.elm

1
module PrettyDate (prettyDate) where
1
module PrettyDate (prettyDate) where
2
2
3
{-| Relative time formatting.
4
5
Supports both dates in the past and in the future.
6
 -}
7
3
import Date
8
import Date
4
import Date (Date)
9
import Date (Date)
5
10
11
{-| Format the second date relative to the first one. -}
6
prettyDate : Date -> Date -> String
12
prettyDate : Date -> Date -> String
7
prettyDate reference date =
13
prettyDate reference date =
8
    let referenceSeconds = Date.toTime reference
14
    let referenceSeconds = Date.toTime reference