Skip to content

Commit

Permalink
Add short names of the days of week for Russian localisation (soywiz-…
Browse files Browse the repository at this point in the history
…archive#144)

* Add short names of the days of week for Russian localization

Co-authored-by: Andrew Panasiuk <andrew.panasiuk@thewise.house>
  • Loading branch information
andrewforester and Andrew Panasiuk authored Oct 12, 2020
1 parent b3caab5 commit 33bbdb8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions klock/src/commonMain/kotlin/com/soywiz/klock/locale/ru.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ open class RussianKlockLocale : KlockLocale() {
override val daysOfWeek = listOf(
"воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота"
)

override val daysOfWeekShort = listOf(
"вс", "пн", "вт", "ср", "чт", "пт", "сб"
)

override val months = listOf(
"января", "февраля", "марта", "апреля", "мая", "июня",
"июля", "августа", "сентября", "октября", "ноября", "декабря"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class KlockLocaleTest {
fun testRussianLocale() {
assertEquals(
"""
Сре, 13 Мар 2019 21:36:45 UTC
Ср, 13 Мар 2019 21:36:45 UTC
13 Мар 2019 г. 21:36:45
13.03.2019 21:36
Среда, 13 Марта 2019 г.
Expand Down Expand Up @@ -217,6 +217,9 @@ class KlockLocaleTest {

assertEquals("середа", DayOfWeek.Wednesday.localName(KlockLocale.ukrainian))
assertEquals("ср", DayOfWeek.Wednesday.localShortName(KlockLocale.ukrainian))

assertEquals("воскресенье", DayOfWeek.Sunday.localName(KlockLocale.russian))
assertEquals("вс", DayOfWeek.Sunday.localShortName(KlockLocale.russian))
}

@Test
Expand Down

0 comments on commit 33bbdb8

Please sign in to comment.