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

Added relative method to Polish locale #480

Closed
wants to merge 1,831 commits into from

Conversation

pepkin88
Copy link
Contributor

Also deleted past, future and duration format strings, as they are now handled by the relative method.
Also added missing 3rd form for days dni and fixed singular form for month miesiąc.

I hope that it doesn't break backward compatibility. I was relying on the relative method from Russian locale.

I used the following test cases and for each case it sounds correct:

console.table([133, 60, 60, 24, 7, 4, 12, 30].reduce(function (ret, number, idx) {
    var unit = 'milliseconds seconds minutes hours days weeks months years'.split(' ')[idx]
    for (var i = 1; i <= number; i += 1) ret.push([
        i[unit]().duration('en'),
        i[unit]().duration('pl'),
        Date.create(i + ' ' + unit + ' ago').relative('pl'),
        Date.create(i + ' ' + unit + ' from now').relative('pl'),
    ])
    return ret
}, []))

andrewplummer and others added 26 commits May 1, 2014 01:31
Documentation of Array.to ambiguous
Also deleted `past`, `future` and `duration` format strings, as they are now handled by the `relative` method.
Also added missing 3rd form for days `dni` and fixed singular for month `miesiąc`.
@pepkin88 pepkin88 changed the title Added relative method Added relative method to Polish locale Jan 14, 2015
@andrewplummer
Copy link
Owner

Hi... I've finally patched in your pull request here: eea0cca

Sorry for taking so long!

FYI I also got started writing the unit tests as well:
https://github.com/andrewplummer/Sugar/blob/master-2.0.0/test/tests/locales/pl.js

All you have to do is uncomment, fill in, and fix wording as necessary... If you're ever so inclined! :D

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.

6 participants