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

Commit

Permalink
Merge pull request #102 from b-nurdaulet-b/master
Browse files Browse the repository at this point in the history
"ru" & "uk" locale code bug fixed. Added Ukrainian to Objective-C framework.
  • Loading branch information
kevinlawler committed Jun 1, 2016
2 parents 5048248 + e1ecc59 commit 4c832ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NSDate+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ extension NSDate {
}

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

Expand Down
2 changes: 1 addition & 1 deletion NSDate+TimeAgo.m
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ -(NSString *)getLocaleFormatUnderscoresWithValue:(double)value
NSString *localeCode = [[NSLocale preferredLanguages] objectAtIndex:0];

// Russian (ru)
if([localeCode isEqual:@"ru"]) {
if([localeCode hasPrefix:@"ru"] || [localeCode hasPrefix:@"uk"]) {
int XY = (int)floor(value) % 100;
int Y = (int)floor(value) % 10;

Expand Down

0 comments on commit 4c832ee

Please sign in to comment.