Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jquery.prettydate-ru.js #21

Closed
wants to merge 1 commit into from
Closed

Update jquery.prettydate-ru.js #21

wants to merge 1 commit into from

Conversation

evgenyneverov
Copy link

There is not only 2-4 and 5+ variants.

For example, "21 hour ago" in russian pronounces as "1 hour ago"

There is not only 2-4 and 5+ variants.

For example, "21 hour ago" in russian pronounces as "1 hour ago"
@Menelion
Copy link
Contributor

Menelion commented Jun 9, 2013

@deMoneIrk, I've included this in my logic. See:

return amt % 10 === 1 && amt % 100 !== 11 ? amt : ...

That means that it should return singular (час) if the remainder of dividing number by 10 is equal to 1, but if the remainder of dividing the number by 100 is not equal to 11. So it will return:

  • 1 час
  • 11 часов
  • 21 час
  • 31 час

etc.

@evgenyneverov
Copy link
Author

On my website your code without these fix showed me "21 часов" instead of "21 час", so I wrote these fix.

@Menelion
Copy link
Contributor

@deMoneIrk, OK, will test this more thoroughly. Sorry for the inconvenience.

@evgenyneverov
Copy link
Author

That's ok! Thank you for a great plugin!)

Евгений Неверов
+7 924 608-19-77

13.06.2013, в 18:33, Menelion Elensúle notifications@github.com написал(а):

@deMoneIrk, OK, will test this more thoroughly. Sorry for the inconvenience.


Reply to this email directly or view it on GitHub.

@jzaefferer
Copy link
Owner

@Oire I landed your earlier PR. Did that address the issue outlined here? If not, could you send a new PR?

@jzaefferer jzaefferer closed this Jun 21, 2013
@Menelion
Copy link
Contributor

@jzaefferer, I'll check this and, if not, send a new PR from a new branch. Actually, QUnit is new to me, so I'll make several tests to ensure everything works correctly.

Menelion pushed a commit to Menelion/jquery-prettydate that referenced this pull request Jul 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants