-
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 #41 from relabsoss/ru_de_locale
Ru de locale
- Loading branch information
Showing
6 changed files
with
134 additions
and
0 deletions.
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,33 @@ | ||
module Date.Extra.Config.Config_ru_ru exposing (..) | ||
|
||
{-| This is the default russian config for formatting dates. | ||
@docs config | ||
Copyright (c) 2016 Slava Turchaninov | ||
-} | ||
|
||
import Date | ||
import Date.Extra.Config as Config | ||
import Date.Extra.I18n.I_ru_ru as Russian | ||
|
||
|
||
{-| Config for ru-ru. -} | ||
config : Config.Config | ||
config = | ||
{ i18n = | ||
{ dayShort = Russian.dayShort | ||
, dayName = Russian.dayName | ||
, monthShort = Russian.monthShort | ||
, monthName = Russian.monthName | ||
, dayOfMonthWithSuffix = Russian.dayOfMonthWithSuffix | ||
} | ||
, format = | ||
{ date = "%d/%m/%Y" -- d/M/YYY | ||
, longDate = "%A, %B %d, %Y" -- dddd, MMMM dd, yyyy | ||
, time = "%H:%M" -- H:mm tt | ||
, 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
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,85 @@ | ||
module Date.Extra.I18n.I_ru_ru exposing (..) | ||
|
||
{-| Russian values for day and month names. | ||
@docs dayShort | ||
@docs dayName | ||
@docs monthShort | ||
@docs monthName | ||
@docs dayOfMonthWithSuffix | ||
Copyright (c) 2017 Slava Turchaninov | ||
-} | ||
|
||
|
||
import Date exposing (Day (..), Month (..)) | ||
import String exposing (padLeft) | ||
|
||
|
||
{-| Day short name. -} | ||
dayShort : Day -> String | ||
dayShort day = | ||
case day of | ||
Mon -> "Пн" | ||
Tue -> "Вт" | ||
Wed -> "Ср" | ||
Thu -> "Чт" | ||
Fri -> "Пт" | ||
Sat -> "Сб" | ||
Sun -> "Вс" | ||
|
||
|
||
{-| Day full name. -} | ||
dayName : Day -> String | ||
dayName day = | ||
case day of | ||
Mon -> "Понедельник" | ||
Tue -> "Вторник" | ||
Wed -> "Среда" | ||
Thu -> "Четверг" | ||
Fri -> "Пятница" | ||
Sat -> "Суббота" | ||
Sun -> "Воскресенье" | ||
|
||
|
||
{-| Month short name. -} | ||
monthShort : Month -> String | ||
monthShort month = | ||
case month of | ||
Jan -> "Янв" | ||
Feb -> "Фев" | ||
Mar -> "Мар" | ||
Apr -> "Апр" | ||
May -> "Май" | ||
Jun -> "Июн" | ||
Jul -> "Июл" | ||
Aug -> "Авг" | ||
Sep -> "Сен" | ||
Oct -> "Окт" | ||
Nov -> "Ноя" | ||
Dec -> "Дек" | ||
|
||
|
||
{-| Month full name. -} | ||
monthName : Month -> String | ||
monthName month = | ||
case month of | ||
Jan -> "Январь" | ||
Feb -> "Февраль" | ||
Mar -> "Март" | ||
Apr -> "Апрель" | ||
May -> "Май" | ||
Jun -> "Июнь" | ||
Jul -> "Июль" | ||
Aug -> "Август" | ||
Sep -> "Сентябрь" | ||
Oct -> "Октябрь" | ||
Nov -> "Ноябрь" | ||
Dec -> "Декабрь" | ||
|
||
|
||
{-| Just convert to string-} | ||
dayOfMonthWithSuffix : Bool -> Int -> String | ||
dayOfMonthWithSuffix pad day = | ||
case day of | ||
_ -> (toString day) |
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