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

Faker::PhoneNumber.phone_number with pl locale always starts from "61-" #169

Closed
matkoniecz opened this issue Jan 18, 2014 · 2 comments
Closed

Comments

@matkoniecz
Copy link

It is using only Poznań area code - see https://en.wikipedia.org/wiki/Telephone_numbers_in_Poland#National_area_codes

Mobile numbers are never generated - see https://en.wikipedia.org/wiki/Telephone_numbers_in_Poland#Mobile_numbers

require 'faker'
def check
    for i in 1..1000
        puts Faker::PhoneNumber.phone_number
    end
end
check
Faker::Config.locale = "pl"
sleep 1
check
@mhutter
Copy link
Contributor

mhutter commented Jan 18, 2014

How are Phone Numbers usually written in Poland? Currently Fakers implements 61-xxxx-xxx for phone numbers and 50x-xxx-xxx for cell phones (which, by the way are only generated whenn using Faker::PhoneNumber.cell_phone), but Wikipedia lists 61 xxx xx xx and 50 xxx xx xx.

@matkoniecz
Copy link
Author

yy is a national area code, x-es - rest of the number. The following form are typically used:

yy-xxx-xx-xx
yy-xxxx-xxx (current form)
yy-xxx xx xx
yy-xxxx xxx
yy xxx xx xx
yy xxxx xxx
yy xxxxxxx

yy is national area code and list of possibilities from https://en.wikipedia.org/wiki/Telephone_numbers_in_Poland#National_area_codes is AFAIK correct

mobile phones - https://en.wikipedia.org/wiki/Telephone_numbers_in_Poland#Mobile_numbers seems OK (also two digit code from list, this time it denotes operator that issued the number, current method will generate only subset of potentially valid numbers)

"(which, by the way are only generated whenn using Faker::PhoneNumber.cell_phone)"

Ops.

@stympy stympy closed this as completed in fbb9e7e Mar 8, 2014
stympy added a commit that referenced this issue Mar 8, 2014
Added missing National Area Codes for Poland. Fixes #169
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

No branches or pull requests

2 participants