Skip to content

Instantly share code, notes, and snippets.

View raulsananes's full-sized avatar

Raul Sananes raulsananes

View GitHub Profile
@raulsananes
raulsananes / RaulsPhoneAreaCode.gs
Last active September 3, 2017 07:51
This Google Apps Script will allow you to determine the state and timezone of any phone number in the United States. Please check also http://j.mp/RaulsPhoneCodes
function state(phone){
phonet=phone.toString();
areaCode=phonet.replace(/\D/g,'').substr(0, 3);
areaCodei=Number(areaCode);
switch (areaCodei)
{
case 205:
case 251:
case 256:
case 334: