Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Adding Ukrainian from MatthewYork/DateTools
Browse files Browse the repository at this point in the history
  • Loading branch information
kgn committed Oct 16, 2015
1 parent 4bdf18d commit fff9711
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions NSDate+Extension.swift
Expand Up @@ -152,18 +152,19 @@ extension NSDate {
return ""
}

if localeCode == "ru" {
// Russian (ru) and Ukrainian (uk)
if localeCode == "ru" || localeCode == "uk" {
let XY = Int(floor(value)) % 100
let Y = Int(floor(value)) % 10

if Y == 0 || Y > 4 || (XY > 10 && XY < 15) {
return ""
}

if Y > 1 && Y < 5 && (XY < 10 || XY > 20) {
return "_"
}

if Y == 1 && XY != 11 {
return "__"
}
Expand Down

0 comments on commit fff9711

Please sign in to comment.