Giter VIP home page Giter VIP logo

city-timezones's Introduction

Hi there πŸ‘‹

city-timezones's People

Contributors

amiantos avatar atkit avatar bill-kitsune avatar dchevell avatar dependabot[bot] avatar fazendaaa avatar kevinroberts avatar lolaeva avatar lukasoppermann avatar magrinj avatar peerrich avatar uulltt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

city-timezones's Issues

"timezone": null

Hi!
Thanks for this. So far it is the best data for my purpose … a simple LaunchBar action.
It is not a huge blow, but there are a couple of entries without a timezone. Just wanted to let you know.
β€” Christian

Json file does not contain most of the cities

Hi,
Thank you for the efforts in developing this module.
I have found that most of the cities are not available in the json file.
I have attached a file which contains a list of missing cities in the json file, can you please look into it?
city.txt

Add 'flattened' city names

Would it be possible to add support for flattened city names, where the accents are removed, so we can look up cities irrespective of their accents?

Right now I have a workaround:
When I load:

    for (let i = 0; i < cityTimezones.cityMapping.length; i++) {
      // eslint-disable-next-line camelcase
      (cityTimezones.cityMapping[i] as any).city_flattened
        = removeAccents(cityTimezones.cityMapping[i].city_ascii).toLowerCase();
    }

and then when I lookup:

   cityName = removeAccents(cityName).toLowerCase();
    cities = CityTimezones.cityMapping;
    for (let i = 0; i < cities.length; i++) {
      if ((cities[i] as any).city_flattened === cityName) {
        return cities[i];
      }
    }

and the implementation for the removeAccents function:

function removeAccents (text: string): string {
  return text.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.