Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DateToolsSwift/DateTools/Date+TimeAgo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public extension Date {

private func getLocaleFormatUnderscoresWithValue(_ value: Double) -> String{
let localCode = Bundle.main.preferredLocalizations[0]
if (localCode == "ru" || localCode == "uk") {
if (localCode == "ru" || localCode == "uk" || localCode.contains("sr")) {
let XY = Int(floor(value).truncatingRemainder(dividingBy: 100))
let Y = Int(floor(value).truncatingRemainder(dividingBy: 10))

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* No comment provided by engineer. */
"%d days ago" = "Пре %d дана";
"%d _days ago" = "Пре %d дана";
"%d __days ago" = "Пре %d дан";

/* No comment provided by engineer. */
"%d hours ago" = "Пре %d сати";
"%d _hours ago" = "Пре %d сата";
"%d __hours ago" = "Пре %d сат";

/* No comment provided by engineer. */
"%d minutes ago" = "Пре %d минута";
"%d _minutes ago" = "Пре %d минута";
"%d __minutes ago" = "Пре %d минут";

/* No comment provided by engineer. */
"%d months ago" = "Пре %d месеци";
"%d _months ago" = "Пре %d месеца";
"%d __months ago" = "Пре %d месец";

/* No comment provided by engineer. */
"%d seconds ago" = "Пре %d секунди";
"%d _seconds ago" = "Пре %d секунде";
"%d __seconds ago" = "Пре %d секунд";

/* No comment provided by engineer. */
"%d weeks ago" = "Пре %d недеља";
"%d _weeks ago" = "Пре %d недеље";
"%d __weeks ago" = "Пре %d недељу";

/* No comment provided by engineer. */
"%d years ago" = "Pre %d godina";
"%d _years ago" = "Pre %d godine";
"%d __years ago" = "Pre %d godinu";

/* No comment provided by engineer. */
"A minute ago" = "Пре минут";

/* No comment provided by engineer. */
"An hour ago" = "Пре сат времена";

/* No comment provided by engineer. */
"Just now" = "Управо сада";

/* No comment provided by engineer. */
"Last month" = "Прошлог месеца";

/* No comment provided by engineer. */
"Last week" = "Прошле недеље";

/* No comment provided by engineer. */
"Last year" = "Прошле године";

/* No comment provided by engineer. */
"Yesterday" = "Јуче";

/* No comment provided by engineer. */
"1 year ago" = "Пре годину дана";
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* No comment provided by engineer. */
"%d days ago" = "Pre %d dana";
"%d _days ago" = "Pre %d dana";
"%d __days ago" = "Pre %d dan";

/* No comment provided by engineer. */
"%d hours ago" = "Pre %d sati";
"%d _hours ago" = "Pre %d sata";
"%d __hours ago" = "Pre %d sat";

/* No comment provided by engineer. */
"%d minutes ago" = "Pre %d minuta";
"%d _minutes ago" = "Pre %d minuta";
"%d __minutes ago" = "Pre %d minut";

/* No comment provided by engineer. */
"%d months ago" = "Pre %d meseci";
"%d _months ago" = "Pre %d meseca";
"%d __months ago" = "Pre %d mesec";

/* No comment provided by engineer. */
"%d seconds ago" = "Pre %d sekundi";
"%d _seconds ago" = "Pre %d sekunde";
"%d __seconds ago" = "Pre %d sekund";

/* No comment provided by engineer. */
"%d weeks ago" = "Pre %d nedelja";
"%d _weeks ago" = "Pre %d nedelje";
"%d __weeks ago" = "Pre %d nedelju";

/* No comment provided by engineer. */
"%d years ago" = "Pre %d godina";
"%d _years ago" = "Pre %d godine";
"%d __years ago" = "Pre %d godinu";

/* No comment provided by engineer. */
"A minute ago" = "Pre minut";

/* No comment provided by engineer. */
"An hour ago" = "Pre sat vremena";

/* No comment provided by engineer. */
"Just now" = "Upravo sada";

/* No comment provided by engineer. */
"Last month" = "Prošli mesec";

/* No comment provided by engineer. */
"Last week" = "Prošle nedelje";

/* No comment provided by engineer. */
"Last year" = "Prošle godine";

/* No comment provided by engineer. */
"Yesterday" = "Juče";

/* No comment provided by engineer. */
"1 year ago" = "Pre godinu dana";
2 changes: 1 addition & 1 deletion DateToolsSwift/DateTools/TimePeriodGroup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ open class TimePeriodGroup: Sequence {
}

public func split(maxSplits: Int, omittingEmptySubsequences: Bool, whereSeparator isSeparator: (TimePeriodProtocol) throws -> Bool) rethrows -> [AnySequence<TimePeriodProtocol>] {
return try periods.split(maxSplits: maxSplits, omittingEmptySubsequences: omittingEmptySubsequences, whereSeparator: isSeparator)
return try periods.split(maxSplits: maxSplits, omittingEmptySubsequences: omittingEmptySubsequences, whereSeparator: isSeparator).map(AnySequence.init)
}

subscript(index: Int) -> TimePeriodProtocol {
Expand Down