-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from ohanhi/master
Add Finnish locale
- Loading branch information
Showing
3 changed files
with
111 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module Date.Extra.Config.Config_fi_fi exposing (..) | ||
|
||
{-| This is the Finnish config for formatting dates. | ||
@docs config | ||
Copyright (c) 2016 Ossi Hanhinen | ||
-} | ||
|
||
import Date | ||
import Date.Extra.Config as Config | ||
import Date.Extra.I18n.I_fi_fi as Finnish | ||
|
||
|
||
{-| Config for fi-fi. -} | ||
config : Config.Config | ||
config = | ||
{ i18n = | ||
{ dayShort = Finnish.dayShort | ||
, dayName = Finnish.dayName | ||
, monthShort = Finnish.monthShort | ||
, monthName = Finnish.monthName | ||
} | ||
, format = | ||
{ date = "%-d.%-m.%Y" -- d.m.YYYY | ||
, longDate = "%A, %-d %B %Y" -- dddd, d MMMM yyyy | ||
, time = "%-H:%M" -- h:mm | ||
, longTime = "%-H:%M:%S" -- h:mm:ss | ||
, dateTime = "%-d.%-m.%Y %-H:%M" -- date + time | ||
, firstDayOfWeek = Date.Mon | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
module Date.Extra.I18n.I_fi_fi exposing (..) | ||
|
||
{-| Finnish values for day and month names. | ||
@docs dayShort | ||
@docs dayName | ||
@docs monthShort | ||
@docs monthName | ||
Copyright (c) 2016 Ossi Hanhinen | ||
-} | ||
|
||
|
||
import Date exposing (Day (..), Month (..)) | ||
|
||
|
||
{-| Day short name. -} | ||
dayShort : Day -> String | ||
dayShort day = | ||
case day of | ||
Mon -> "ma" | ||
Tue -> "ti" | ||
Wed -> "ke" | ||
Thu -> "to" | ||
Fri -> "pe" | ||
Sat -> "la" | ||
Sun -> "su" | ||
|
||
|
||
{-| Day full name. -} | ||
dayName : Day -> String | ||
dayName day = | ||
case day of | ||
Mon -> "maanantai" | ||
Tue -> "tiistai" | ||
Wed -> "keskiviikko" | ||
Thu -> "torstai" | ||
Fri -> "perjantai" | ||
Sat -> "lauantai" | ||
Sun -> "sunnuntai" | ||
|
||
|
||
{-| Month short name. -} | ||
monthShort : Month -> String | ||
monthShort month = | ||
case month of | ||
Jan -> "tammi" | ||
Feb -> "helmi" | ||
Mar -> "maalis" | ||
Apr -> "huhti" | ||
May -> "touko" | ||
Jun -> "kesä" | ||
Jul -> "heinä" | ||
Aug -> "elo" | ||
Sep -> "syys" | ||
Oct -> "loka" | ||
Nov -> "marras" | ||
Dec -> "joulu" | ||
|
||
|
||
{-| Month full name. -} | ||
monthName : Month -> String | ||
monthName month = | ||
case month of | ||
Jan -> "tammikuuta" | ||
Feb -> "helmikuuta" | ||
Mar -> "maaliskuuta" | ||
Apr -> "huhtikuuta" | ||
May -> "toukokuuta" | ||
Jun -> "kesäkuuta" | ||
Jul -> "heinäkuuta" | ||
Aug -> "elokuuta" | ||
Sep -> "syyskuuta" | ||
Oct -> "lokakuuta" | ||
Nov -> "marraskuuta" | ||
Dec -> "joulukuuta" |