开发者

How To Turn A Phone Number (or area code) Into a Time Zone In Rails [duplicate]

This question already has answers here: Get current time with a phone number (3 answers) Closed 5 years ago.

We have software that displays phone numbers, and we need to dynamically show what time it is at that phone number. Clearl开发者_如何转开发y the system wont be perfect because of portability with cell phones, but its important we can approximate. Is there a library or api that does this with rails? Or at worst a simple text database we can download and use?


You can download a database from NANPA which gives Country, State/Province, etc. from which you should be able to map timezone pretty easily. NANPA administers the area code assignments, so the database should be authoritative.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜