Skip to content

Commit

Permalink
Merge pull request #510 from mikemikhaylov/more-options-for-ru-minutes
Browse files Browse the repository at this point in the history
Adds more options for minutes in ru locale
  • Loading branch information
wanasit committed Apr 9, 2023
2 parents 9152fc4 + 5f12516 commit d634e75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/locales/ru/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ export const TIME_UNIT_DICTIONARY: { [word: string]: OpUnitType | QUnitType } =
минуток: "minute",
минутки: "minute",
минутку: "minute",
минуточек: "minute",
минуточки: "minute",
минуточку: "minute",
час: "hour",
часов: "hour",
часа: "hour",
Expand Down Expand Up @@ -284,7 +287,7 @@ export function parseNumberPattern(match: string): number {

export const ORDINAL_NUMBER_PATTERN = `(?:${matchAnyPattern(ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:го|ого|е|ое)?)`;
export function parseOrdinalNumberPattern(match: string): number {
let num = match.toLowerCase();
const num = match.toLowerCase();
if (ORDINAL_WORD_DICTIONARY[num] !== undefined) {
return ORDINAL_WORD_DICTIONARY[num];
}
Expand Down

0 comments on commit d634e75

Please sign in to comment.