From c0846b49e505c40d59ac837ddfa66568e297575c Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Sun, 5 Mar 2017 10:44:54 +0100 Subject: [PATCH] Rework the way Nominatim responses are handled. Closes #167. --- CHANGELOG.rst | 8 + PH_SH_batch_exporter.sh | 4 +- PH_SH_exporter.js | 38 +- README.md | 4 +- holidays/.gitignore | 1 + holidays/README.md | 23 +- holidays/br.yaml | 2 + holidays/cz.yaml | 2 + holidays/de.yaml | 33 +- holidays/dk.yaml | 2 + holidays/hu.yaml | 2 + holidays/it.yaml | 2 + holidays/nominatim_cache/br.yaml | 20 + holidays/nominatim_cache/br_Mato Grosso.yaml | 20 + holidays/nominatim_cache/cz.yaml | 24 + holidays/nominatim_cache/de.yaml | 22 + holidays/nominatim_cache/de_bb.yaml | 21 + holidays/nominatim_cache/de_be.yaml | 23 + holidays/nominatim_cache/de_bw.yaml | 22 + holidays/nominatim_cache/de_by.yaml | 23 + holidays/nominatim_cache/de_hb.yaml | 24 + holidays/nominatim_cache/de_he.yaml | 23 + holidays/nominatim_cache/de_hh.yaml | 22 + holidays/nominatim_cache/de_mv.yaml | 26 + holidays/nominatim_cache/de_ni.yaml | 22 + holidays/nominatim_cache/de_nw.yaml | 26 + holidays/nominatim_cache/de_rp.yaml | 22 + holidays/nominatim_cache/de_sh.yaml | 24 + holidays/nominatim_cache/de_sl.yaml | 22 + holidays/nominatim_cache/de_sn.yaml | 22 + holidays/nominatim_cache/de_st.yaml | 22 + holidays/nominatim_cache/de_th.yaml | 22 + holidays/nominatim_cache/dk.yaml | 19 + holidays/nominatim_cache/hu.yaml | 23 + holidays/nominatim_cache/it.yaml | 22 + holidays/nominatim_cache/pl.yaml | 24 + holidays/nominatim_cache/ro.yaml | 21 + holidays/nominatim_cache/ru_adygea.yaml | 24 + holidays/nominatim_cache/ru_altai.yaml | 19 + .../nominatim_cache/ru_bashkortostan.yaml | 20 + holidays/nominatim_cache/ru_bryansk.yaml | 21 + holidays/nominatim_cache/ru_buryatia.yaml | 19 + holidays/nominatim_cache/ru_chechnya.yaml | 20 + holidays/nominatim_cache/ru_chuvashia.yaml | 20 + holidays/nominatim_cache/ru_dagestan.yaml | 19 + holidays/nominatim_cache/ru_ingushetia.yaml | 22 + .../ru_kabardino_balkaria.yaml | 19 + holidays/nominatim_cache/ru_kalmykia.yaml | 19 + .../nominatim_cache/ru_karachay_cherkess.yaml | 20 + holidays/nominatim_cache/ru_karelia.yaml | 19 + holidays/nominatim_cache/ru_komi.yaml | 18 + holidays/nominatim_cache/ru_sakha.yaml | 25 + holidays/nominatim_cache/ru_saratov.yaml | 21 + holidays/nominatim_cache/ru_tatarstan.yaml | 26 + holidays/nominatim_cache/ru_tuva.yaml | 19 + holidays/nominatim_cache/ru_udmurtia.yaml | 24 + holidays/nominatim_cache/se.yaml | 19 + holidays/nominatim_cache/sk.yaml | 19 + holidays/nominatim_cache/us_ak.yaml | 21 + holidays/nominatim_cache/us_al.yaml | 22 + holidays/nominatim_cache/us_ar.yaml | 23 + holidays/nominatim_cache/us_az.yaml | 19 + holidays/nominatim_cache/us_ca.yaml | 22 + holidays/nominatim_cache/us_co.yaml | 20 + holidays/nominatim_cache/us_ct.yaml | 22 + holidays/nominatim_cache/us_dc.yaml | 20 + holidays/nominatim_cache/us_de.yaml | 24 + holidays/nominatim_cache/us_fl.yaml | 22 + holidays/nominatim_cache/us_ga.yaml | 20 + holidays/nominatim_cache/us_gu.yaml | 20 + holidays/nominatim_cache/us_hi.yaml | 20 + holidays/nominatim_cache/us_ia.yaml | 22 + holidays/nominatim_cache/us_id.yaml | 22 + holidays/nominatim_cache/us_il.yaml | 24 + holidays/nominatim_cache/us_in.yaml | 22 + holidays/nominatim_cache/us_ks.yaml | 22 + holidays/nominatim_cache/us_ky.yaml | 21 + holidays/nominatim_cache/us_la.yaml | 18 + holidays/nominatim_cache/us_ma.yaml | 26 + holidays/nominatim_cache/us_md.yaml | 21 + holidays/nominatim_cache/us_me.yaml | 21 + holidays/nominatim_cache/us_mi.yaml | 25 + holidays/nominatim_cache/us_mn.yaml | 19 + holidays/nominatim_cache/us_mo.yaml | 21 + holidays/nominatim_cache/us_ms.yaml | 22 + holidays/nominatim_cache/us_mt.yaml | 22 + holidays/nominatim_cache/us_nc.yaml | 25 + holidays/nominatim_cache/us_nd.yaml | 22 + holidays/nominatim_cache/us_ne.yaml | 25 + holidays/nominatim_cache/us_nh.yaml | 21 + holidays/nominatim_cache/us_nj.yaml | 21 + holidays/nominatim_cache/us_nm.yaml | 19 + holidays/nominatim_cache/us_nv.yaml | 25 + holidays/nominatim_cache/us_ny.yaml | 23 + holidays/nominatim_cache/us_oh.yaml | 20 + holidays/nominatim_cache/us_ok.yaml | 22 + holidays/nominatim_cache/us_or.yaml | 19 + holidays/nominatim_cache/us_pa.yaml | 22 + holidays/nominatim_cache/us_pr.yaml | 22 + holidays/nominatim_cache/us_ri.yaml | 21 + holidays/nominatim_cache/us_sc.yaml | 22 + holidays/nominatim_cache/us_sd.yaml | 22 + holidays/nominatim_cache/us_tn.yaml | 21 + holidays/nominatim_cache/us_tx.yaml | 21 + holidays/nominatim_cache/us_ut.yaml | 22 + holidays/nominatim_cache/us_va.yaml | 21 + holidays/nominatim_cache/us_vi.yaml | 23 + holidays/nominatim_cache/us_vt.yaml | 22 + holidays/nominatim_cache/us_wa.yaml | 19 + holidays/nominatim_cache/us_wi.yaml | 20 + holidays/nominatim_cache/us_wv.yaml | 21 + holidays/nominatim_cache/us_wy.yaml | 22 + holidays/populate_nominatim_cache | 180 +++ holidays/ro.yaml | 2 + holidays/ru.yaml | 76 +- holidays/se.yaml | 2 + holidays/sk.yaml | 2 + holidays/us.yaml | 108 ++ index.js | 3 +- js/i18n-resources.js | 1033 ----------------- js/nominatim_definitions.js | 129 -- locales/lang.yaml | 1 + package.json | 7 +- taginfo.json | 4 +- taginfo_template.json | 4 +- test.de.log | 233 +++- test.en.log | 233 +++- test.js | 705 ++++------- 128 files changed, 3298 insertions(+), 1704 deletions(-) create mode 100644 holidays/.gitignore create mode 100644 holidays/nominatim_cache/br.yaml create mode 100644 holidays/nominatim_cache/br_Mato Grosso.yaml create mode 100644 holidays/nominatim_cache/cz.yaml create mode 100644 holidays/nominatim_cache/de.yaml create mode 100644 holidays/nominatim_cache/de_bb.yaml create mode 100644 holidays/nominatim_cache/de_be.yaml create mode 100644 holidays/nominatim_cache/de_bw.yaml create mode 100644 holidays/nominatim_cache/de_by.yaml create mode 100644 holidays/nominatim_cache/de_hb.yaml create mode 100644 holidays/nominatim_cache/de_he.yaml create mode 100644 holidays/nominatim_cache/de_hh.yaml create mode 100644 holidays/nominatim_cache/de_mv.yaml create mode 100644 holidays/nominatim_cache/de_ni.yaml create mode 100644 holidays/nominatim_cache/de_nw.yaml create mode 100644 holidays/nominatim_cache/de_rp.yaml create mode 100644 holidays/nominatim_cache/de_sh.yaml create mode 100644 holidays/nominatim_cache/de_sl.yaml create mode 100644 holidays/nominatim_cache/de_sn.yaml create mode 100644 holidays/nominatim_cache/de_st.yaml create mode 100644 holidays/nominatim_cache/de_th.yaml create mode 100644 holidays/nominatim_cache/dk.yaml create mode 100644 holidays/nominatim_cache/hu.yaml create mode 100644 holidays/nominatim_cache/it.yaml create mode 100644 holidays/nominatim_cache/pl.yaml create mode 100644 holidays/nominatim_cache/ro.yaml create mode 100644 holidays/nominatim_cache/ru_adygea.yaml create mode 100644 holidays/nominatim_cache/ru_altai.yaml create mode 100644 holidays/nominatim_cache/ru_bashkortostan.yaml create mode 100644 holidays/nominatim_cache/ru_bryansk.yaml create mode 100644 holidays/nominatim_cache/ru_buryatia.yaml create mode 100644 holidays/nominatim_cache/ru_chechnya.yaml create mode 100644 holidays/nominatim_cache/ru_chuvashia.yaml create mode 100644 holidays/nominatim_cache/ru_dagestan.yaml create mode 100644 holidays/nominatim_cache/ru_ingushetia.yaml create mode 100644 holidays/nominatim_cache/ru_kabardino_balkaria.yaml create mode 100644 holidays/nominatim_cache/ru_kalmykia.yaml create mode 100644 holidays/nominatim_cache/ru_karachay_cherkess.yaml create mode 100644 holidays/nominatim_cache/ru_karelia.yaml create mode 100644 holidays/nominatim_cache/ru_komi.yaml create mode 100644 holidays/nominatim_cache/ru_sakha.yaml create mode 100644 holidays/nominatim_cache/ru_saratov.yaml create mode 100644 holidays/nominatim_cache/ru_tatarstan.yaml create mode 100644 holidays/nominatim_cache/ru_tuva.yaml create mode 100644 holidays/nominatim_cache/ru_udmurtia.yaml create mode 100644 holidays/nominatim_cache/se.yaml create mode 100644 holidays/nominatim_cache/sk.yaml create mode 100644 holidays/nominatim_cache/us_ak.yaml create mode 100644 holidays/nominatim_cache/us_al.yaml create mode 100644 holidays/nominatim_cache/us_ar.yaml create mode 100644 holidays/nominatim_cache/us_az.yaml create mode 100644 holidays/nominatim_cache/us_ca.yaml create mode 100644 holidays/nominatim_cache/us_co.yaml create mode 100644 holidays/nominatim_cache/us_ct.yaml create mode 100644 holidays/nominatim_cache/us_dc.yaml create mode 100644 holidays/nominatim_cache/us_de.yaml create mode 100644 holidays/nominatim_cache/us_fl.yaml create mode 100644 holidays/nominatim_cache/us_ga.yaml create mode 100644 holidays/nominatim_cache/us_gu.yaml create mode 100644 holidays/nominatim_cache/us_hi.yaml create mode 100644 holidays/nominatim_cache/us_ia.yaml create mode 100644 holidays/nominatim_cache/us_id.yaml create mode 100644 holidays/nominatim_cache/us_il.yaml create mode 100644 holidays/nominatim_cache/us_in.yaml create mode 100644 holidays/nominatim_cache/us_ks.yaml create mode 100644 holidays/nominatim_cache/us_ky.yaml create mode 100644 holidays/nominatim_cache/us_la.yaml create mode 100644 holidays/nominatim_cache/us_ma.yaml create mode 100644 holidays/nominatim_cache/us_md.yaml create mode 100644 holidays/nominatim_cache/us_me.yaml create mode 100644 holidays/nominatim_cache/us_mi.yaml create mode 100644 holidays/nominatim_cache/us_mn.yaml create mode 100644 holidays/nominatim_cache/us_mo.yaml create mode 100644 holidays/nominatim_cache/us_ms.yaml create mode 100644 holidays/nominatim_cache/us_mt.yaml create mode 100644 holidays/nominatim_cache/us_nc.yaml create mode 100644 holidays/nominatim_cache/us_nd.yaml create mode 100644 holidays/nominatim_cache/us_ne.yaml create mode 100644 holidays/nominatim_cache/us_nh.yaml create mode 100644 holidays/nominatim_cache/us_nj.yaml create mode 100644 holidays/nominatim_cache/us_nm.yaml create mode 100644 holidays/nominatim_cache/us_nv.yaml create mode 100644 holidays/nominatim_cache/us_ny.yaml create mode 100644 holidays/nominatim_cache/us_oh.yaml create mode 100644 holidays/nominatim_cache/us_ok.yaml create mode 100644 holidays/nominatim_cache/us_or.yaml create mode 100644 holidays/nominatim_cache/us_pa.yaml create mode 100644 holidays/nominatim_cache/us_pr.yaml create mode 100644 holidays/nominatim_cache/us_ri.yaml create mode 100644 holidays/nominatim_cache/us_sc.yaml create mode 100644 holidays/nominatim_cache/us_sd.yaml create mode 100644 holidays/nominatim_cache/us_tn.yaml create mode 100644 holidays/nominatim_cache/us_tx.yaml create mode 100644 holidays/nominatim_cache/us_ut.yaml create mode 100644 holidays/nominatim_cache/us_va.yaml create mode 100644 holidays/nominatim_cache/us_vi.yaml create mode 100644 holidays/nominatim_cache/us_vt.yaml create mode 100644 holidays/nominatim_cache/us_wa.yaml create mode 100644 holidays/nominatim_cache/us_wi.yaml create mode 100644 holidays/nominatim_cache/us_wv.yaml create mode 100644 holidays/nominatim_cache/us_wy.yaml create mode 100755 holidays/populate_nominatim_cache delete mode 100644 js/i18n-resources.js delete mode 100644 js/nominatim_definitions.js diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ea942403..b2f22175 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -112,6 +112,9 @@ Changed ~~~~~~~ * Migrated to use `ES2015 modules`_ and rollup_ for module bundling [simon04_] +* Update to holiday definition format 2.2.0. Holidays are now maintained in + YAML files, one for each country. [ypid_] +* Rework the way Nominatim responses which are used for testing are handled. [ypid_] * Input tolerance: For a value such as ``Mo-Fr 08:00-12:00 by_appointment`` the tool did previously suggest to use ``Mo-Fr 08:00-12:00 "on appointment"`` but @@ -122,6 +125,11 @@ Changed .. _ES2015 modules: http://exploringjs.com/es6/ch_modules.html .. _rollup: http://rollupjs.org/ +Fixed +~~~~~ + +* Fix Russian public holiday definitions. Regions where not in local language and thus not matched properly. [ypid_] + v3.5.0_ - 2017-02-17 -------------------- diff --git a/PH_SH_batch_exporter.sh b/PH_SH_batch_exporter.sh index e5f440dc..0389efd4 100755 --- a/PH_SH_batch_exporter.sh +++ b/PH_SH_batch_exporter.sh @@ -30,7 +30,7 @@ for state in bw by be bb hb hh he mv ni nw rp sn st sl sh th do filepath="feiertage_${state}.conf" echo "Generating $filepath …" - ./PH_SH_exporter.js /tmp/PH_SH_export.list --from 2013 --until 2042 --public-holidays --region $state --omit-date-hyphens + ./PH_SH_exporter.js /tmp/PH_SH_export.list --from 2013 --to 2042 --public-holidays --state $state --omit-date-hyphens ( print_header cat /tmp/PH_SH_export.list @@ -42,7 +42,7 @@ for state in bw by be bb hb hh he mv ni nw rp sn st do filepath="ferien_${state}.conf" echo "Generating $filepath …" - ./PH_SH_exporter.js /tmp/PH_SH_export.list --from 2013 --until 2016 --school-holidays --region $state --omit-date-hyphens + ./PH_SH_exporter.js /tmp/PH_SH_export.list --from 2013 --to 2016 --school-holidays --state $state --omit-date-hyphens ( print_header cat /tmp/PH_SH_export.list diff --git a/PH_SH_exporter.js b/PH_SH_exporter.js index 3c712f38..b5576410 100755 --- a/PH_SH_exporter.js +++ b/PH_SH_exporter.js @@ -1,7 +1,7 @@ #!/usr/bin/env nodejs /* Info, license and author {{{ * @license AGPLv3 - * @author Copyright (C) 2015 Robin Schneider + * @author Copyright (C) 2015-2017 Robin Schneider * * Written for: https://github.com/anschuetz/linuxmuster/issues/1#issuecomment-110888829 * @@ -22,10 +22,8 @@ /* Required modules {{{ */ var opening_hours = require('./opening_hours.js'); var fs = require('fs'); -/* }}} */ - -/* Constants {{{ */ -var nominatim_object = require('./js/nominatim_definitions.js').for_loc; +var glob = require('glob'); +var yaml = require('js-yaml'); /* }}} */ /* Parameter handling {{{ */ @@ -44,8 +42,7 @@ var optimist = require('optimist') .describe('o', 'Omit hyphen in ISO 8061 dates.') .default('o', false) .default('c', 'de') - .describe('r', 'Region (for which the holidays apply). Defaults to Baden-Württemberg.') - .default('r', 'bw') + .describe('r', 'Region (for which the holidays apply). If not given, the country wide definition is used.') .boolean(['p', 's', ]) .alias('h', 'help') .alias('v', 'verbose') @@ -54,7 +51,7 @@ var optimist = require('optimist') .alias('p', ['public-holidays', 'ph']) .alias('s', ['school-holidays', 'sh']) .alias('c', 'country') - .alias('r', 'region') + .alias('r', 'state') .alias('o', 'omit-date-hyphens'); var argv = optimist.argv; @@ -67,11 +64,22 @@ if (argv.help || argv._.length === 0) { /* Error handling {{{ */ if (argv['public-holidays'] && argv['school-holidays']) { console.error("--school-holidays and --public-holidays can not be used together."); - process.exit(0); + process.exit(1); } -if (typeof nominatim_object[argv.country] !== 'object' || typeof nominatim_object[argv.country][argv.region] !== 'object') { - console.error(argv.country + ", " + argv.region + " is currently not supported."); - process.exit(0); +if (!(argv['public-holidays'] || argv['school-holidays'])) { + console.error("Either --school-holidays or --public-holidays has to be specified."); + process.exit(1); +} +let nominatim_by_loc = {}; +for (let nominatim_file of glob.sync("holidays/nominatim_cache/*.yaml")) { + let country_state = nominatim_file.match(/^.*\/([^/]*)\.yaml$/)[1]; + nominatim_by_loc[country_state] = yaml.safeLoad(fs.readFileSync(nominatim_file)); +} +const nominatim_data = nominatim_by_loc[argv.country + '_' + argv.state] || nominatim_by_loc[argv.country]; + +if (typeof nominatim_data !== 'object') { + console.error(argv.country + (", " + argv.state ? typeof nominatim_data !== 'object' : '') + " is currently not supported."); + process.exit(1); } /* }}} */ @@ -81,11 +89,11 @@ var filepath = argv._[0]; var oh_value = argv['public-holidays'] ? 'PH' : 'SH'; -write_config_file(filepath, oh_value, nominatim_object[argv.country][argv.region], new Date(argv.from, 0, 1), new Date(argv.to + 1, 0, 1)); +write_config_file(filepath, oh_value, nominatim_data, new Date(argv.from, 0, 1), new Date(argv.to + 1, 0, 1)); -function write_config_file(filepath, oh_value, nominatim_object, from_date, to_date) { +function write_config_file(filepath, oh_value, nominatim_data, from_date, to_date) { try { - oh = new opening_hours(oh_value, nominatim_object); + oh = new opening_hours(oh_value, nominatim_data); } catch (err) { console.error('Something went wrong. Please file a issue at https://github.com/opening-hours/opening_hours.js/issues'); process.exit(0); diff --git a/README.md b/README.md index c0eabc62..a1173dfb 100644 --- a/README.md +++ b/README.md @@ -652,7 +652,7 @@ YoHours currently only checks with this lib if the opening_hours value can be ev ## Bindings and ports -* Python: https://github.com/ypid/pyopening_hours (using the JS implementation through Python subprocess and JSON passing to a Node.JS process executing the JS implementation, access to the [simple API](https://github.com/ypid/opening_hours.js#simple-api)) +* Python: https://github.com/ypid/pyopening_hours (using the JS implementation through Python subprocess and JSON passing to a Node.JS process executing the JS implementation, access to the [simple API](https://github.com/opening-hours/opening_hours.js#simple-api)) * Java/Nashorn: https://josm.openstreetmap.de/ticket/11755 (using the JS implementation through [Nashorn](http://openjdk.java.net/projects/nashorn/), Status: Nashorn provides access to all features of the JS implementation) - Java/Android: https://github.com/ypid/ComplexAlarm (using the JS implementation through [js-evaluator-for-android](https://github.com/evgenyneu/js-evaluator-for-android), Status: Library runs on Android, Return code/Result passing from JS to Java not yet clear/tested) @@ -715,7 +715,7 @@ Please refer to the [holiday documentation][ohlib.docs.holiday] for more details Please consider adding a test (with a time range of one year for example) to see if everything works as expected and to ensure that it will stay that way. See under [testing][ohlib.testing]. -In case your holiday definition does only change the `holiday_definitions` variable (and not core code) it is also ok to test the definition using the `PH_SH_exporter.js` script. In that case writing a test is not required but still appreciated. Example: `./PH_SH_exporter.js --verbose --from=2016 --to=2016 --public-holidays --country dk --region dk /tmp/dk_holidays.txt` +In case your holiday definition does only change the `holiday_definitions` variable (and not core code) it is also ok to test the definition using the `PH_SH_exporter.js` script. In that case writing a test is not required but still appreciated. Example: `./PH_SH_exporter.js --verbose --from=2016 --to=2016 --public-holidays --country dk --state dk /tmp/dk_holidays.txt` ### Core code diff --git a/holidays/.gitignore b/holidays/.gitignore new file mode 100644 index 00000000..50b5fd13 --- /dev/null +++ b/holidays/.gitignore @@ -0,0 +1 @@ +requests_cache.sqlite diff --git a/holidays/README.md b/holidays/README.md index 4040b43a..520a8e49 100644 --- a/holidays/README.md +++ b/holidays/README.md @@ -6,7 +6,7 @@ Because each country/culture has it‘s own important dates/events, holidays are defined on a country level. The country wide definition can be overwritten as needed by more specific definitions. Because this library works with the OSM ecosystem, those boundaries are based on OSM. -More specifically, the dataset on which a decision is made which holidays apply for a given location is based on the information returned from [Nominatim](https://wiki.openstreetmap.org/wiki/Nominatim). +More specifically, the dataset on which a decision is made which holidays apply for a given location is based on [Nominatim](https://wiki.openstreetmap.org/wiki/Nominatim). Consider this [Nominatim reverse geocoding][] query: https://nominatim.openstreetmap.org/reverse?format=json&lat=49.5487&lon=9.8160&zoom=18&addressdetails=1&accept-language=de,en @@ -45,23 +45,23 @@ as of 2016-06-29. For now it has been enough to make a decision based on the fields `address.country_code` and `address.state` and thus only those two levels are supported right now in the data format. But the other information is there when needed, just extend the data format and source code to make use of it. Note that you will need to use exactly the same values that Nominatim returns in the holiday definition data format which is described next. -Also note that the data format is based on Nominatim results in local language so you will likely need to adjust the `accept-language` URL get parameter from the example. +Also note that the definition is based on Nominatim results in local language so you will likely need to adjust the `accept-language` URL get parameter from the example. Refer to [Nominatim/Country Codes](https://wiki.openstreetmap.org/wiki/Nominatim/Country_Codes) for the country codes to language code mapping used for this specification. -You can use https://www.openstreetmap.org to get the coordinates for the regions you are defining holidays for. Just search the region and position the map view on that region. Copy the latitude and longitude from the address bar. Consider this example of a permalink: +You can use https://www.openstreetmap.org to get the coordinates for the states you are defining holidays for. Just search the state and position the map view on that state. Copy the latitude and longitude from the address bar. Consider this example of a permalink: https://www.openstreetmap.org/#map=15/49.5487/9.8160 -You can now use the `&lat=49.5487&lon=9.8160` parameters and use them instead of the once in the example Nominatim query shown above. Note that you should include this Nominatim URL for each defined region using the `_nominatim_url` key (see below). +You can now use the `&lat=49.5487&lon=9.8160` parameters and use them instead of the once in the example Nominatim query shown above. Note that you should include this Nominatim URL for each defined state using the `_nominatim_url` key (see below). The `_nominatim_url` is intended to make testing of the holiday definitions easier. You could also do a [Nominatim search][] directly using: https://nominatim.openstreetmap.org/search?format=json&country=Deutschland&state=Berlin&&zoom=18&addressdetails=1&limit=1&accept-language=de,en and then do the [Nominatim reverse geocoding][] using the returned coordinates. But note that the `_nominatim_url` needs to be a [Nominatim reverse geocoding][] query because of different attributes being returned. -## Holiday definition data format +## Holiday definition format -Data format version `2.2.0`. The data format will probably need to be adopted to support more holiday definitions in the future. +Data format version `2.2.0`. The data format will probably need to be adapted to support more holiday definitions in the future. The data format versioning complies with [Semantic Versioning](http://semver.org/spec/v2.0.0.html). Each country has it’s own [YAML] file below [./holidays/][ohlib.holidays] with @@ -78,8 +78,13 @@ _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=49. PH: {} # https://de.wikipedia.org/wiki/Feiertage_in_Deutschland Baden-Württemberg: # Does only apply in Baden-Württemberg + _state_code: bw + # Short string which can be used to refer to this entry in the test framework. + # Needs to be unique for the country wide definition. + # Should be specified when a commonly known code exists for the country/state. + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=49.5487&lon=9.8160&zoom=18&addressdetails=1&accept-language=de,en' - # Somewhere in this state/region. + # Somewhere in this state/state. # PH: {} # This more specific rule set overwrites the country wide one (they are just ignored). @@ -94,7 +99,7 @@ The dictionary of the country either consists of `PH`, `SH` or the value of `add Note that the data format versions below 2.2.0 used JSON as data serialization language. The data structure remains the same as 2.1.0 however. -### Holiday definition data format: PH +### Holiday definition format: PH Now lets look at the public holiday (`PH`) definition in more detail. Each `PH` definition consists of a dictionary with holiday name as key and date definition as values (specifying one day). Holiday names should be in the local language. A date definition either consists of two integers representing month and day or the name of a movable event and the offset to that event. The movable events and the formulas for calculating them for a given year are defined in the `getMovableEventsForYear` function. @@ -122,7 +127,7 @@ PH: # https://de.wikipedia.org/wiki/Feiertage_in_Deutschland Note that the array of date definitions can hold an optional array of `address.state` strings. When this list is present, the holiday is only applied when `address.state` is found in that array of strings. -### Holiday definition data format: SH +### Holiday definition format: SH School holiday (`SH`) definitions look a little bit different. This is because school holidays usually spans multiple days and because `SH` are different for each year/can not be mathematically calculated (at least the countries that @ypid has seen so far). This is not very nice, but as we are hackers, we can just grab the data and convert it into the data format documented here. This is what @ypid has been doing for all states in Germany using the [hc] tool which was developed for use with this library and which fellows might find useful to convert holidays for other countries as well. diff --git a/holidays/br.yaml b/holidays/br.yaml index a9f5ddb5..6b699a23 100644 --- a/holidays/br.yaml +++ b/holidays/br.yaml @@ -1,5 +1,7 @@ --- +_nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=-10&lon=-52&zoom=18&addressdetails=1&accept-language=pt,en' + PH: # https://pt.wikipedia.org/wiki/Feriados_no_Brasil 'Ano Novo': [1, 1] 'Carnaval': [easter, -47] diff --git a/holidays/cz.yaml b/holidays/cz.yaml index ddfce319..854fe2f9 100644 --- a/holidays/cz.yaml +++ b/holidays/cz.yaml @@ -1,5 +1,7 @@ --- +_nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=50.0874401&lon=14.4212556&zoom=18&addressdetails=1&accept-language=cs,en' + # http://www.mpsv.cz/cs/74 or english: https://en.wikipedia.org/wiki/Public_holidays_in_the_Czech_Republic PH: 'Den obnovy samostatného českého státu': [1, 1] diff --git a/holidays/de.yaml b/holidays/de.yaml index a5c252b1..12e767aa 100644 --- a/holidays/de.yaml +++ b/holidays/de.yaml @@ -23,7 +23,8 @@ PH: # https://de.wikipedia.org/wiki/Feiertage_in_Deutschland # Everything below is generated and kept up-to-date by hc. Baden-Württemberg: - _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=49.5487&lon=9.8160&zoom=18&addressdetails=1&accept-language=de,en' + _state_code: bw + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=49.5487429714954&lon=9.81602098644987&zoom=18&addressdetails=1' SH: - name: Osterferien '2012': [4, 2, 4, 13] @@ -80,6 +81,8 @@ Baden-Württemberg: '2019': [12, 23, 1, 4] Bayern: + _state_code: by + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=48.9467562&lon=11.4038717&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Winterferien '2012': [2, 20, 2, 24] @@ -166,6 +169,8 @@ Bayern: '2023': [12, 23, 1, 5] Berlin: + _state_code: be + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=52.5170365&lon=13.3888599&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Winterferien '2012': [1, 30, 2, 4] @@ -252,6 +257,8 @@ Berlin: '2023': [12, 23, 1, 5] Brandenburg: + _state_code: bb + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=52.8455492&lon=13.2461296&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Winterferien '2012': [1, 30, 2, 4] @@ -338,6 +345,8 @@ Brandenburg: '2023': [12, 23, 1, 5] Bremen: + _state_code: hb + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=53.0758196&lon=8.8071646&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Winterferien '2012': [1, 30, 1, 31] @@ -424,6 +433,8 @@ Bremen: '2023': [12, 23, 1, 5] Hamburg: + _state_code: hh + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=53.5437641&lon=10.0099133&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Winterferien '2012': [1, 30, 1, 30] @@ -510,6 +521,8 @@ Hamburg: '2023': [12, 22, 1, 5] Hessen: + _state_code: he + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=50.6118537&lon=9.1909725&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Osterferien '2012': [4, 2, 4, 14] @@ -568,6 +581,8 @@ Hessen: '2023': [12, 27, 1, 13] Mecklenburg-Vorpommern: + _state_code: mv + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=53.7735234&lon=12.5755746&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Winterferien '2012': [2, 6, 2, 17] @@ -654,6 +669,8 @@ Mecklenburg-Vorpommern: '2023': [12, 21, 1, 3] Niedersachsen: + _state_code: ni + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=52.6368397&lon=9.8456838&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Winterferien '2012': [1, 30, 1, 31] @@ -740,6 +757,8 @@ Niedersachsen: '2023': [12, 27, 1, 5] Nordrhein-Westfalen: + _state_code: nw + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=51.4785568&lon=7.5533645&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Osterferien '2012': [4, 2, 4, 14] @@ -811,6 +830,8 @@ Nordrhein-Westfalen: '2023': [12, 21, 1, 5] Rheinland-Pfalz: + _state_code: rp + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=49.7497346&lon=7.4396553&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Winterferien '2019': [2, 25, 3, 1] @@ -877,6 +898,8 @@ Rheinland-Pfalz: '2023': [12, 27, 1, 5] Saarland: + _state_code: sl + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=49.4173988&lon=6.9805789&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Winterferien '2012': [2, 20, 2, 25] @@ -954,6 +977,8 @@ Saarland: '2023': [12, 21, 1, 2] Sachsen: + _state_code: sn + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=50.9295798&lon=13.4585052&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Winterferien '2012': [2, 13, 2, 25] @@ -1040,6 +1065,8 @@ Sachsen: '2023': [12, 23, 1, 2] Sachsen-Anhalt: + _state_code: st + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=51.908526&lon=11.4939134&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Winterferien '2012': [2, 4, 2, 11] @@ -1106,6 +1133,8 @@ Sachsen-Anhalt: '2019': [12, 23, 1, 4] Schleswig-Holstein: + _state_code: sh + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=54.1853998&lon=9.8220089&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Osterferien '2012': [3, 30, 4, 13] @@ -1178,6 +1207,8 @@ Schleswig-Holstein: '2023': [12, 27, 1, 6] Thüringen: + _state_code: th + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=50.7333163&lon=11.0747905&zoom=18&addressdetails=1&accept-language=de,en' SH: - name: Winterferien '2012': [2, 6, 2, 11] diff --git a/holidays/dk.yaml b/holidays/dk.yaml index 9f386336..8ec6c7c9 100644 --- a/holidays/dk.yaml +++ b/holidays/dk.yaml @@ -1,5 +1,7 @@ --- +_nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=55.670249&lon=10.3333283&zoom=18&addressdetails=1&accept-language=da,en' + PH: # https://en.wikipedia.org/wiki/Public_holidays_in_Denmark 'Nytårsdag': [1, 1] 'Skærtorsdag': [easter, -3] diff --git a/holidays/hu.yaml b/holidays/hu.yaml index 62aa793b..2c6f0fbd 100644 --- a/holidays/hu.yaml +++ b/holidays/hu.yaml @@ -1,5 +1,7 @@ --- +_nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=47.4821&lon=19.0640&zoom=18&addressdetails=1&accept-language=hu,en' + # https://hu.wikipedia.org/wiki/Magyarorsz%C3%A1gi_%C3%BCnnepek_%C3%A9s_eml%C3%A9knapok_list%C3%A1ja PH: 'újév': [1, 1] diff --git a/holidays/it.yaml b/holidays/it.yaml index 8428b553..52585b4b 100644 --- a/holidays/it.yaml +++ b/holidays/it.yaml @@ -1,5 +1,7 @@ --- +_nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=41.9808038&lon=12.7662312&zoom=18&addressdetails=1&accept-language=it,en' + # http://www.governo.it/Presidenza/ufficio_cerimoniale/cerimoniale/giornate.html PH: 'Capodanno': [1, 1] diff --git a/holidays/nominatim_cache/br.yaml b/holidays/nominatim_cache/br.yaml new file mode 100644 index 00000000..4da9a6a6 --- /dev/null +++ b/holidays/nominatim_cache/br.yaml @@ -0,0 +1,20 @@ +--- +place_id: '119832650' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '242268712' +lat: '-10.1425809' +lon: '-51.9179115' +display_name: MT-430, Confresa, Microrregião do Norte Araguaia, Mato Grosso, Região Centro-Oeste, Brasil +address: + country: Brasil + country_code: br + # county: Microrregião do Norte Araguaia + # road: MT-430 + # state: Mato Grosso + # town: Confresa +boundingbox: + - '-10.4276788' + - '-9.9747152' + - '-52.0892082' + - '-51.8810199' diff --git a/holidays/nominatim_cache/br_Mato Grosso.yaml b/holidays/nominatim_cache/br_Mato Grosso.yaml new file mode 100644 index 00000000..80107961 --- /dev/null +++ b/holidays/nominatim_cache/br_Mato Grosso.yaml @@ -0,0 +1,20 @@ +--- +place_id: '121131789' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '242263835' +lat: '-10.4558864' +lon: '-52.1139026' +display_name: Pe de Caju, Confresa, Microrregião do Norte Araguaia, Mato Grosso, Região Centro-Oeste, Brasil +address: + country: Brasil + country_code: br + county: Microrregião do Norte Araguaia + road: Pe de Caju + state: Mato Grosso + town: Confresa +boundingbox: + - '-10.5309667' + - '-10.3787208' + - '-52.1341469' + - '-52.0963442' diff --git a/holidays/nominatim_cache/cz.yaml b/holidays/nominatim_cache/cz.yaml new file mode 100644 index 00000000..464297ac --- /dev/null +++ b/holidays/nominatim_cache/cz.yaml @@ -0,0 +1,24 @@ +--- +place_id: '139997564' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '340086966' +lat: '50.08748275' +lon: '14.4213733265222' +display_name: Pražský poledník, Staroměstské náměstí, Staré Město, Praha, okres Hlavní město Praha, Hlavní město Praha, Praha, + 110 00, Česko +address: + country: Česko + country_code: cz + # city: Praha + # county: okres Hlavní město Praha + # memorial: Pražský poledník + # pedestrian: Staroměstské náměstí + # postcode: 110 00 + # state: Praha + # suburb: Staré Město +boundingbox: + - '50.0874129' + - '50.0875525' + - '14.4213686' + - '14.4213781' diff --git a/holidays/nominatim_cache/de.yaml b/holidays/nominatim_cache/de.yaml new file mode 100644 index 00000000..6be2105d --- /dev/null +++ b/holidays/nominatim_cache/de.yaml @@ -0,0 +1,22 @@ +--- +place_id: '204698388' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '416578669' +lat: '49.5438327' +lon: '9.8155867' +display_name: K 2847, Lauda-Königshofen, Main-Tauber-Kreis, Regierungsbezirk Stuttgart, Baden-Württemberg, 97922, Deutschland +address: + country: Deutschland + country_code: de + # county: Main-Tauber-Kreis + # postcode: 97922 + # road: K 2847 + # state: Baden-Württemberg + # state_district: Regierungsbezirk Stuttgart + # town: Lauda-Königshofen +boundingbox: + - '49.5401338' + - '49.5523393' + - '9.8003394' + - '9.8274515' diff --git a/holidays/nominatim_cache/de_bb.yaml b/holidays/nominatim_cache/de_bb.yaml new file mode 100644 index 00000000..31d3404d --- /dev/null +++ b/holidays/nominatim_cache/de_bb.yaml @@ -0,0 +1,21 @@ +--- +place_id: '72461530' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '32207279' +lat: '52.8471666' +lon: '13.250061' +display_name: Großmutzer Heuweg, Löwenberger Land, Landkreis Oberhavel, Brandenburg, 16775, Deutschland +address: + country: Deutschland + country_code: de + county: Landkreis Oberhavel + postcode: '16775' + road: Großmutzer Heuweg + state: Brandenburg + village: Löwenberger Land +boundingbox: + - '52.8454233' + - '52.8487398' + - '13.249534' + - '13.250061' diff --git a/holidays/nominatim_cache/de_be.yaml b/holidays/nominatim_cache/de_be.yaml new file mode 100644 index 00000000..2ed9927d --- /dev/null +++ b/holidays/nominatim_cache/de_be.yaml @@ -0,0 +1,23 @@ +--- +place_id: '204274960' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '1818862993' +lat: '52.517322' +lon: '13.388977' +display_name: Douglas, Unter den Linden, Mitte, Berlin, 10117, Deutschland +address: + address29: Douglas + city: Berlin + city_district: Mitte + country: Deutschland + country_code: de + postcode: '10117' + road: Unter den Linden + state: Berlin + suburb: Mitte +boundingbox: + - '52.517222' + - '52.517422' + - '13.388877' + - '13.389077' diff --git a/holidays/nominatim_cache/de_bw.yaml b/holidays/nominatim_cache/de_bw.yaml new file mode 100644 index 00000000..c12a7368 --- /dev/null +++ b/holidays/nominatim_cache/de_bw.yaml @@ -0,0 +1,22 @@ +--- +place_id: '204698388' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '416578669' +lat: '49.5438327' +lon: '9.8155867' +display_name: K 2847, Lauda-Königshofen, Main-Tauber-Kreis, Regierungsbezirk Stuttgart, Baden-Württemberg, 97922, Deutschland +address: + country: Deutschland + country_code: de + county: Main-Tauber-Kreis + postcode: '97922' + road: K 2847 + state: Baden-Württemberg + state_district: Regierungsbezirk Stuttgart + town: Lauda-Königshofen +boundingbox: + - '49.5401338' + - '49.5523393' + - '9.8003394' + - '9.8274515' diff --git a/holidays/nominatim_cache/de_by.yaml b/holidays/nominatim_cache/de_by.yaml new file mode 100644 index 00000000..5fed0c78 --- /dev/null +++ b/holidays/nominatim_cache/de_by.yaml @@ -0,0 +1,23 @@ +--- +place_id: '197928661' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '298457553' +lat: '48.946586' +lon: '11.4042882' +display_name: Geographischer Mittelpunkt Bayerns, Mühlenweg, Kipfenberg, Landkreis Eichstätt, Oberbayern, Bayern, 85110, Deutschland +address: + country: Deutschland + country_code: de + county: Landkreis Eichstätt + memorial: Geographischer Mittelpunkt Bayerns + path: Mühlenweg + postcode: '85110' + state: Bayern + state_district: Oberbayern + village: Kipfenberg +boundingbox: + - '48.946486' + - '48.946686' + - '11.4041882' + - '11.4043882' diff --git a/holidays/nominatim_cache/de_hb.yaml b/holidays/nominatim_cache/de_hb.yaml new file mode 100644 index 00000000..770fb884 --- /dev/null +++ b/holidays/nominatim_cache/de_hb.yaml @@ -0,0 +1,24 @@ +--- +place_id: '89411236' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '111389011' +lat: '53.0759058' +lon: '8.80732623676389' +display_name: Roland, Am Markt, Altstadt, Mitte, Stadtbezirk Bremen-Mitte, Bremen, 28195, Deutschland +address: + attraction: Roland + city: Bremen + city_district: Stadtbezirk Bremen-Mitte + country: Deutschland + country_code: de + neighbourhood: Altstadt + pedestrian: Am Markt + postcode: '28195' + state: Bremen + suburb: Mitte +boundingbox: + - '53.075893' + - '53.0759191' + - '8.8073051' + - '8.8073476' diff --git a/holidays/nominatim_cache/de_he.yaml b/holidays/nominatim_cache/de_he.yaml new file mode 100644 index 00000000..2e508519 --- /dev/null +++ b/holidays/nominatim_cache/de_he.yaml @@ -0,0 +1,23 @@ +--- +place_id: '75237257' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '42300106' +lat: '50.6117272' +lon: '9.1847154' +display_name: Ulrichsteiner Straße, Feldatal, Vogelsbergkreis, Regierungsbezirk Gießen, Hessen, 36325, Deutschland, Europa +address: + continent: Europa + country: Deutschland + country_code: de + county: Vogelsbergkreis + postcode: '36325' + road: Ulrichsteiner Straße + state: Hessen + state_district: Regierungsbezirk Gießen + town: Feldatal +boundingbox: + - '50.6115874' + - '50.6117272' + - '9.1838384' + - '9.1854795' diff --git a/holidays/nominatim_cache/de_hh.yaml b/holidays/nominatim_cache/de_hh.yaml new file mode 100644 index 00000000..12a401c8 --- /dev/null +++ b/holidays/nominatim_cache/de_hh.yaml @@ -0,0 +1,22 @@ +--- +place_id: '69037723' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '25610298' +lat: '53.5446624' +lon: '10.0099043' +display_name: Stadtdeich, Hammerbrook, Hamburg-Mitte, Hamburg, 20097, Deutschland +address: + city: Hamburg + city_district: Hamburg-Mitte + country: Deutschland + country_code: de + postcode: '20097' + road: Stadtdeich + state: Hamburg + suburb: Hammerbrook +boundingbox: + - '53.5439419' + - '53.5447175' + - '10.0098431' + - '10.0104739' diff --git a/holidays/nominatim_cache/de_mv.yaml b/holidays/nominatim_cache/de_mv.yaml new file mode 100644 index 00000000..56f68074 --- /dev/null +++ b/holidays/nominatim_cache/de_mv.yaml @@ -0,0 +1,26 @@ +--- +place_id: '85544270' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '96307767' +lat: '53.77375665' +lon: '12.5756973795233' +display_name: Liontec Versicherungen, 7, Marktplatz, Bahnhof, Pampow, Teterow, Landkreis Rostock, Mecklenburg-Vorpommern, + 17166, Deutschland +address: + address29: Liontec Versicherungen + country: Deutschland + country_code: de + county: Landkreis Rostock + house_number: '7' + neighbourhood: Bahnhof + pedestrian: Marktplatz + postcode: '17166' + state: Mecklenburg-Vorpommern + suburb: Pampow + town: Teterow +boundingbox: + - '53.7737017' + - '53.7738096' + - '12.5756119' + - '12.5757826' diff --git a/holidays/nominatim_cache/de_ni.yaml b/holidays/nominatim_cache/de_ni.yaml new file mode 100644 index 00000000..2892ee36 --- /dev/null +++ b/holidays/nominatim_cache/de_ni.yaml @@ -0,0 +1,22 @@ +--- +place_id: '69903380' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '27838957' +lat: '52.6369699' +lon: '9.8443545' +display_name: Neddelförd, Wieckenberg, Wietze, Landkreis Celle, Niedersachsen, 29323, Deutschland +address: + country: Deutschland + country_code: de + county: Landkreis Celle + neighbourhood: Wieckenberg + postcode: '29323' + road: Neddelförd + state: Niedersachsen + village: Wietze +boundingbox: + - '52.6368852' + - '52.6382872' + - '9.842064' + - '9.8456283' diff --git a/holidays/nominatim_cache/de_nw.yaml b/holidays/nominatim_cache/de_nw.yaml new file mode 100644 index 00000000..1fbacebc --- /dev/null +++ b/holidays/nominatim_cache/de_nw.yaml @@ -0,0 +1,26 @@ +--- +place_id: '77801554' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '58286612' +lat: '51.4782693' +lon: '7.55397917444996' +display_name: 31, Gurlittstraße, Klein-Paris, Aplerbecker Mark, Dortmund, Regierungsbezirk Arnsberg, Nordrhein-Westfalen, + 44287, Deutschland +address: + city: Dortmund + country: Deutschland + country_code: de + county: Dortmund + house_number: '31' + neighbourhood: Klein-Paris + postcode: '44287' + road: Gurlittstraße + state: Nordrhein-Westfalen + state_district: Regierungsbezirk Arnsberg + suburb: Aplerbecker Mark +boundingbox: + - '51.4781874' + - '51.4783425' + - '7.5538663' + - '7.554093' diff --git a/holidays/nominatim_cache/de_rp.yaml b/holidays/nominatim_cache/de_rp.yaml new file mode 100644 index 00000000..84763ef3 --- /dev/null +++ b/holidays/nominatim_cache/de_rp.yaml @@ -0,0 +1,22 @@ +--- +place_id: '119493204' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '240732892' +lat: '49.74945385' +lon: '7.4394715' +display_name: 21, Talstraße, Bärenbach, Kirn-Land, Landkreis Bad Kreuznach, Rheinland-Pfalz, 55758, Deutschland +address: + country: Deutschland + country_code: de + county: Kirn-Land + house_number: '21' + postcode: '55758' + road: Talstraße + state: Rheinland-Pfalz + village: Bärenbach +boundingbox: + - '49.7493737' + - '49.749534' + - '7.4393464' + - '7.4395966' diff --git a/holidays/nominatim_cache/de_sh.yaml b/holidays/nominatim_cache/de_sh.yaml new file mode 100644 index 00000000..d8aa641b --- /dev/null +++ b/holidays/nominatim_cache/de_sh.yaml @@ -0,0 +1,24 @@ +--- +place_id: '844137' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '276862802' +lat: '54.1854669' +lon: '9.8221744' +display_name: Geographischer Mittelpunkt Schleswig-Holsteins, Weg zum Mittelpunkt, Thienbüttel, Nortorf, Nortorfer Land, Kreis + Rendsburg-Eckernförde, Schleswig-Holstein, 24589, Deutschland +address: + country: Deutschland + country_code: de + county: Nortorfer Land + information: Geographischer Mittelpunkt Schleswig-Holsteins + postcode: '24589' + road: Weg zum Mittelpunkt + state: Schleswig-Holstein + suburb: Thienbüttel + town: Nortorf +boundingbox: + - '54.1853669' + - '54.1855669' + - '9.8220744' + - '9.8222744' diff --git a/holidays/nominatim_cache/de_sl.yaml b/holidays/nominatim_cache/de_sl.yaml new file mode 100644 index 00000000..358703d7 --- /dev/null +++ b/holidays/nominatim_cache/de_sl.yaml @@ -0,0 +1,22 @@ +--- +place_id: '86770457' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '101614587' +lat: '49.4173294' +lon: '6.9783698' +display_name: Klingelfloßtalbrücke, Eppelborn, Landkreis Neunkirchen, Saarland, 66571, Deutschland +address: + city_district: Eppelborn + country: Deutschland + country_code: de + county: Landkreis Neunkirchen + postcode: '66571' + road: Klingelfloßtalbrücke + state: Saarland + village: Eppelborn +boundingbox: + - '49.415945' + - '49.4187733' + - '6.9767841' + - '6.9803664' diff --git a/holidays/nominatim_cache/de_sn.yaml b/holidays/nominatim_cache/de_sn.yaml new file mode 100644 index 00000000..d1eade98 --- /dev/null +++ b/holidays/nominatim_cache/de_sn.yaml @@ -0,0 +1,22 @@ +--- +place_id: '105095939' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '180530965' +lat: '50.9269828' +lon: '13.4672032' +display_name: ehem. Schmalspurbahn Klingenberg-Colmnitz–Oberdittmannsdorf, Tharandt, Landkreis Sächsische Schweiz-Osterzgebirge, + Sachsen, 01737, Deutschland +address: + country: Deutschland + country_code: de + county: Tharandt + cycleway: ehem. Schmalspurbahn Klingenberg-Colmnitz–Oberdittmannsdorf + postcode: '01737' + state: Sachsen + town: Tharandt +boundingbox: + - '50.9215397' + - '50.9303764' + - '13.4558271' + - '13.4773934' diff --git a/holidays/nominatim_cache/de_st.yaml b/holidays/nominatim_cache/de_st.yaml new file mode 100644 index 00000000..ffc0c5d5 --- /dev/null +++ b/holidays/nominatim_cache/de_st.yaml @@ -0,0 +1,22 @@ +--- +place_id: '111755785' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '204630964' +lat: '51.9198255' +lon: '11.4828327038105' +display_name: Gewerbegebiet Brefeld, Tarthun, Bördeaue, Egelner Mulde, Salzlandkreis, Sachsen-Anhalt, 39435, Deutschland +address: + city: Bördeaue + city_district: Tarthun + country: Deutschland + country_code: de + county: Egelner Mulde + industrial: Gewerbegebiet Brefeld + postcode: '39435' + state: Sachsen-Anhalt +boundingbox: + - '51.918769' + - '51.9214629' + - '11.4811636' + - '11.486973' diff --git a/holidays/nominatim_cache/de_th.yaml b/holidays/nominatim_cache/de_th.yaml new file mode 100644 index 00000000..80c4fd99 --- /dev/null +++ b/holidays/nominatim_cache/de_th.yaml @@ -0,0 +1,22 @@ +--- +place_id: '99759091' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '159183566' +lat: '50.7314474' +lon: '11.0745871' +display_name: L 1114, Ilmtal, Ilm-Kreis, Thüringen, 99326, Deutschland, Europa +address: + continent: Europa + country: Deutschland + country_code: de + county: Ilm-Kreis + postcode: '99326' + road: L 1114 + state: Thüringen + village: Ilmtal +boundingbox: + - '50.7293736' + - '50.7345749' + - '11.0687048' + - '11.0806635' diff --git a/holidays/nominatim_cache/dk.yaml b/holidays/nominatim_cache/dk.yaml new file mode 100644 index 00000000..dfaeb533 --- /dev/null +++ b/holidays/nominatim_cache/dk.yaml @@ -0,0 +1,19 @@ +--- +place_id: '29137085' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '2686671754' +lat: '55.5977594' +lon: '10.3288756' +display_name: Egeby, Nordfyns Kommune, Region Syddanmark, Danmark +address: + country: Danmark + country_code: dk + # county: Nordfyns Kommune + # hamlet: Egeby + # state: Region Syddanmark +boundingbox: + - '55.5577594' + - '55.6377594' + - '10.2888756' + - '10.3688756' diff --git a/holidays/nominatim_cache/hu.yaml b/holidays/nominatim_cache/hu.yaml new file mode 100644 index 00000000..e801275e --- /dev/null +++ b/holidays/nominatim_cache/hu.yaml @@ -0,0 +1,23 @@ +--- +place_id: '80084984' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '67327954' +lat: '47.48146955' +lon: '19.0639924870181' +display_name: Nehru part, Közraktár utca, Belső-Ferencváros, IX. kerület, Budapest, Közép-Magyarország, 1093, Magyarország +address: + country: Magyarország + country_code: hu + # city: Budapest + # city_district: IX. kerület + # park: Nehru part + # postcode: 1093 + # region: Közép-Magyarország + # road: Közraktár utca + # suburb: Belső-Ferencváros +boundingbox: + - '47.4799813' + - '47.4829177' + - '19.0619122' + - '19.0657089' diff --git a/holidays/nominatim_cache/it.yaml b/holidays/nominatim_cache/it.yaml new file mode 100644 index 00000000..23b77ab4 --- /dev/null +++ b/holidays/nominatim_cache/it.yaml @@ -0,0 +1,22 @@ +--- +place_id: '134927267' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '310842035' +lat: '41.9838098' +lon: '12.7598934' +display_name: Via Colle Nocello, Villanova, Guidonia Montecelio, RM, Lazio, 00010, Italia +address: + country: Italia + country_code: it + # city: Guidonia Montecelio + # county: RM + # postcode: 00010 + # road: Via Colle Nocello + # state: Lazio + # suburb: Villanova +boundingbox: + - '41.9794483' + - '41.9863473' + - '12.7503714' + - '12.7668517' diff --git a/holidays/nominatim_cache/pl.yaml b/holidays/nominatim_cache/pl.yaml new file mode 100644 index 00000000..d77b5bfb --- /dev/null +++ b/holidays/nominatim_cache/pl.yaml @@ -0,0 +1,24 @@ +--- +place_id: '4981024' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '587601599' +lat: '53.4825244' +lon: '18.7584881' +display_name: Auto Gaz, Dworcowa, Osiedle Tysiąclecia, Śródmieście Zewnętrzne, Grudziądz, województwo kujawsko-pomorskie, + Polska +address: + country: Polska + country_code: pl + # city: Grudziądz + # city_district: Śródmieście Zewnętrzne + # county: Grudziądz + # fuel: Auto Gaz + # neighbourhood: Osiedle Tysiąclecia + # road: Dworcowa + # state: województwo kujawsko-pomorskie +boundingbox: + - '53.4824244' + - '53.4826244' + - '18.7583881' + - '18.7585881' diff --git a/holidays/nominatim_cache/ro.yaml b/holidays/nominatim_cache/ro.yaml new file mode 100644 index 00000000..6d2825fb --- /dev/null +++ b/holidays/nominatim_cache/ro.yaml @@ -0,0 +1,21 @@ +--- +place_id: '14920614' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '1370884312' +lat: '45.9854581' +lon: '24.6856746' +display_name: Centru Țării, DJ105, Dealu Frumos, Sibiu, 557141, România +address: + country: România + country_code: ro + # county: Sibiu + # postcode: 557141 + # road: DJ105 + # viewpoint: Centru Țării + # village: Dealu Frumos +boundingbox: + - '45.9853581' + - '45.9855581' + - '24.6855746' + - '24.6857746' diff --git a/holidays/nominatim_cache/ru_adygea.yaml b/holidays/nominatim_cache/ru_adygea.yaml new file mode 100644 index 00000000..0eb69ce4 --- /dev/null +++ b/holidays/nominatim_cache/ru_adygea.yaml @@ -0,0 +1,24 @@ +--- +place_id: '105451648' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '178119466' +lat: '44.60635535' +lon: '40.103552511385' +display_name: Администрация г.Майкопа, 21, Краснооктябрьская улица, Майкоп, городской округ Майкоп, Адыгея, Южный федеральный + округ, 385006, РФ +address: + city: Майкоп + country: РФ + country_code: ru + county: городской округ Майкоп + house_number: '21' + postcode: '385006' + road: Краснооктябрьская улица + state: Адыгея + townhall: Администрация г.Майкопа +boundingbox: + - '44.6061334' + - '44.6065763' + - '40.1033822' + - '40.1042497' diff --git a/holidays/nominatim_cache/ru_altai.yaml b/holidays/nominatim_cache/ru_altai.yaml new file mode 100644 index 00000000..3fb31019 --- /dev/null +++ b/holidays/nominatim_cache/ru_altai.yaml @@ -0,0 +1,19 @@ +--- +place_id: '159717215' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: relation +osm_id: '5698186' +lat: '50.973562' +lon: '86.8106042867446' +display_name: Шашикманское сельское поселение, Онгудайский район, Республика Алтай, Сибирский федеральный округ, РФ +address: + city: Шашикманское сельское поселение + country: РФ + country_code: ru + county: Онгудайский район + state: Республика Алтай +boundingbox: + - '50.6605078' + - '51.2875527' + - '85.891869' + - '87.2364183' diff --git a/holidays/nominatim_cache/ru_bashkortostan.yaml b/holidays/nominatim_cache/ru_bashkortostan.yaml new file mode 100644 index 00000000..58943988 --- /dev/null +++ b/holidays/nominatim_cache/ru_bashkortostan.yaml @@ -0,0 +1,20 @@ +--- +place_id: '75573550' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '40426391' +lat: '54.1665227' +lon: '56.5386785' +display_name: 80Н-004, Зириково, Гафурийский район, Башкортостан, Приволжский федеральный округ, РФ +address: + country: РФ + country_code: ru + county: Гафурийский район + hamlet: Зириково + road: 80Н-004 + state: Башкортостан +boundingbox: + - '54.1286309' + - '54.2317914' + - '56.4702846' + - '56.5563223' diff --git a/holidays/nominatim_cache/ru_bryansk.yaml b/holidays/nominatim_cache/ru_bryansk.yaml new file mode 100644 index 00000000..9b7b0bdf --- /dev/null +++ b/holidays/nominatim_cache/ru_bryansk.yaml @@ -0,0 +1,21 @@ +--- +place_id: '107287015' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '190394567' +lat: '52.9876239' +lon: '33.2285656' +display_name: «Брянск — Новозыбков» — Мглин, Берёзовка, Почепский район, Брянская область, Центральный федеральный округ, + РФ +address: + country: РФ + country_code: ru + county: Почепский район + hamlet: Берёзовка + road: «Брянск — Новозыбков» — Мглин + state: Брянская область +boundingbox: + - '52.9147678' + - '53.0456179' + - '33.0428266' + - '33.424045' diff --git a/holidays/nominatim_cache/ru_buryatia.yaml b/holidays/nominatim_cache/ru_buryatia.yaml new file mode 100644 index 00000000..3d449de4 --- /dev/null +++ b/holidays/nominatim_cache/ru_buryatia.yaml @@ -0,0 +1,19 @@ +--- +place_id: '54371805' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '4107607631' +lat: '52.0787209' +lon: '109.3114842' +display_name: Нарын, Хоринский район, Республика Бурятия, Сибирский федеральный округ, РФ +address: + country: РФ + country_code: ru + county: Хоринский район + hamlet: Нарын + state: Республика Бурятия +boundingbox: + - '52.0387209' + - '52.1187209' + - '109.2714842' + - '109.3514842' diff --git a/holidays/nominatim_cache/ru_chechnya.yaml b/holidays/nominatim_cache/ru_chechnya.yaml new file mode 100644 index 00000000..4c9bbc08 --- /dev/null +++ b/holidays/nominatim_cache/ru_chechnya.yaml @@ -0,0 +1,20 @@ +--- +place_id: '159352360' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: relation +osm_id: '3888369' +lat: '43.35462265' +lon: '45.7218300286871' +display_name: Ленинский район, Грозный, городской округ Грозный, Чечня, Северо-Кавказский федеральный округ, РФ +address: + city: Грозный + city_district: Ленинский район + country: РФ + country_code: ru + county: городской округ Грозный + state: Чечня +boundingbox: + - '43.3033823' + - '43.406214' + - '45.6298801' + - '45.7998351' diff --git a/holidays/nominatim_cache/ru_chuvashia.yaml b/holidays/nominatim_cache/ru_chuvashia.yaml new file mode 100644 index 00000000..70135b4d --- /dev/null +++ b/holidays/nominatim_cache/ru_chuvashia.yaml @@ -0,0 +1,20 @@ +--- +place_id: '89095024' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '115006808' +lat: '55.5013946' +lon: '47.165831' +display_name: 97К-021, Ачакасы, Канашский район, Чувашия, Приволжский федеральный округ, РФ +address: + country: РФ + country_code: ru + county: Канашский район + road: 97К-021 + state: Чувашия + village: Ачакасы +boundingbox: + - '55.4972848' + - '55.5087027' + - '47.1376284' + - '47.1970244' diff --git a/holidays/nominatim_cache/ru_dagestan.yaml b/holidays/nominatim_cache/ru_dagestan.yaml new file mode 100644 index 00000000..28c4ba56 --- /dev/null +++ b/holidays/nominatim_cache/ru_dagestan.yaml @@ -0,0 +1,19 @@ +--- +place_id: '18680652' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '1813994832' +lat: '43.126213' +lon: '47.140011' +display_name: Темиргое, Кумторкалинский район, Дагестан, Северо-Кавказский федеральный округ, РФ +address: + country: РФ + country_code: ru + county: Кумторкалинский район + state: Дагестан + village: Темиргое +boundingbox: + - '43.086213' + - '43.166213' + - '47.100011' + - '47.180011' diff --git a/holidays/nominatim_cache/ru_ingushetia.yaml b/holidays/nominatim_cache/ru_ingushetia.yaml new file mode 100644 index 00000000..016b060a --- /dev/null +++ b/holidays/nominatim_cache/ru_ingushetia.yaml @@ -0,0 +1,22 @@ +--- +place_id: '129915384' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '293569945' +lat: '43.1456795' +lon: '44.8365875' +display_name: P 721, сельское поселение Али-Юрт, Назрановский район, Ингушетия, Северо-Кавказский федеральный округ, 386125, + РФ +address: + city: сельское поселение Али-Юрт + country: РФ + country_code: ru + county: Назрановский район + postcode: '386125' + road: P 721 + state: Ингушетия +boundingbox: + - '43.1453038' + - '43.150751' + - '44.8301607' + - '44.8437444' diff --git a/holidays/nominatim_cache/ru_kabardino_balkaria.yaml b/holidays/nominatim_cache/ru_kabardino_balkaria.yaml new file mode 100644 index 00000000..f0b75efc --- /dev/null +++ b/holidays/nominatim_cache/ru_kabardino_balkaria.yaml @@ -0,0 +1,19 @@ +--- +place_id: '197698375' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '451573367' +lat: '43.5042683' +lon: '43.4856958880137' +display_name: Звёздный, Чегемский район, Кабардино-Балкария, Северо-Кавказский федеральный округ, РФ +address: + country: РФ + country_code: ru + county: Чегемский район + state: Кабардино-Балкария + village: Звёздный +boundingbox: + - '43.4938276' + - '43.5170121' + - '43.4775287' + - '43.501437' diff --git a/holidays/nominatim_cache/ru_kalmykia.yaml b/holidays/nominatim_cache/ru_kalmykia.yaml new file mode 100644 index 00000000..4d17e2e9 --- /dev/null +++ b/holidays/nominatim_cache/ru_kalmykia.yaml @@ -0,0 +1,19 @@ +--- +place_id: '129625921' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '292575902' +lat: '46.5844161' +lon: '44.7787821' +display_name: Майский, Целинный район, Калмыкия, Южный федеральный округ, РФ +address: + country: РФ + country_code: ru + county: Целинный район + hamlet: Майский + state: Калмыкия +boundingbox: + - '46.5820085' + - '46.5858134' + - '44.7751942' + - '44.781889' diff --git a/holidays/nominatim_cache/ru_karachay_cherkess.yaml b/holidays/nominatim_cache/ru_karachay_cherkess.yaml new file mode 100644 index 00000000..54a2d193 --- /dev/null +++ b/holidays/nominatim_cache/ru_karachay_cherkess.yaml @@ -0,0 +1,20 @@ +--- +place_id: '82114681' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '85985696' +lat: '43.7962042' +lon: '41.71137' +display_name: Красный Октябрь-Хасаут Греческое, Зеленчукский район, Карачаево-Черкесия, Северо-Кавказский федеральный округ, + РФ +address: + country: РФ + country_code: ru + county: Зеленчукский район + road: Красный Октябрь-Хасаут Греческое + state: Карачаево-Черкесия +boundingbox: + - '43.7939694' + - '43.8055496' + - '41.7024146' + - '41.721844' diff --git a/holidays/nominatim_cache/ru_karelia.yaml b/holidays/nominatim_cache/ru_karelia.yaml new file mode 100644 index 00000000..1862ee29 --- /dev/null +++ b/holidays/nominatim_cache/ru_karelia.yaml @@ -0,0 +1,19 @@ +--- +place_id: '159375825' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: relation +osm_id: '1020571' +lat: '63.94629385' +lon: '33.5193580207717' +display_name: Чернопорожское сельское поселение, Сегежский район, Республика Карелия, Северо-Западный федеральный округ, РФ +address: + city: Чернопорожское сельское поселение + country: РФ + country_code: ru + county: Сегежский район + state: Республика Карелия +boundingbox: + - '63.6374649' + - '64.2349849' + - '32.9565148' + - '34.0150959' diff --git a/holidays/nominatim_cache/ru_komi.yaml b/holidays/nominatim_cache/ru_komi.yaml new file mode 100644 index 00000000..f03b10fc --- /dev/null +++ b/holidays/nominatim_cache/ru_komi.yaml @@ -0,0 +1,18 @@ +--- +place_id: '159296911' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: relation +osm_id: '1082933' +lat: '65.0204625' +lon: '57.3740830196108' +display_name: район Печора, Республика Коми, Северо-Западный федеральный округ, РФ +address: + country: РФ + country_code: ru + county: район Печора + state: Республика Коми +boundingbox: + - '64.2084881' + - '65.8293614' + - '54.5594168' + - '60.2214468' diff --git a/holidays/nominatim_cache/ru_sakha.yaml b/holidays/nominatim_cache/ru_sakha.yaml new file mode 100644 index 00000000..c132da10 --- /dev/null +++ b/holidays/nominatim_cache/ru_sakha.yaml @@ -0,0 +1,25 @@ +--- +place_id: '131761281' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '297831427' +lat: '62.10115345' +lon: '129.71764735' +display_name: 17, Центральный переулок, племка, район Племобъединение, Якутск, городской округ Якутск, Республика Саха (Якутия), + Дальневосточный федеральный округ, 677901, РФ +address: + city: Якутск + country: РФ + country_code: ru + county: городской округ Якутск + house_number: '17' + neighbourhood: племка + postcode: '677901' + road: Центральный переулок + state: Республика Саха (Якутия) + suburb: район Племобъединение +boundingbox: + - '62.1011103' + - '62.1011966' + - '129.7175408' + - '129.7177539' diff --git a/holidays/nominatim_cache/ru_saratov.yaml b/holidays/nominatim_cache/ru_saratov.yaml new file mode 100644 index 00000000..eca92b98 --- /dev/null +++ b/holidays/nominatim_cache/ru_saratov.yaml @@ -0,0 +1,21 @@ +--- +place_id: '72006392' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '31715230' +lat: '51.3025933' +lon: '46.6200904' +display_name: Р-236 Саратов - Озинки, Безымянское сельское поселение, Энгельсский район, Саратовская область, Приволжский + федеральный округ, РФ +address: + city: Безымянское сельское поселение + country: РФ + country_code: ru + county: Энгельсский район + road: Р-236 Саратов - Озинки + state: Саратовская область +boundingbox: + - '51.2433229' + - '51.3722329' + - '46.2833177' + - '46.9556462' diff --git a/holidays/nominatim_cache/ru_tatarstan.yaml b/holidays/nominatim_cache/ru_tatarstan.yaml new file mode 100644 index 00000000..da8a1a89 --- /dev/null +++ b/holidays/nominatim_cache/ru_tatarstan.yaml @@ -0,0 +1,26 @@ +--- +place_id: '6785522' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '702354243' +lat: '55.7781934' +lon: '49.1296756' +display_name: Гранд синема, 6, Спартаковская улица, Старо-Татарская слобода, Вахитовский район, Казань, городской округ Казань, + Татарстан, Приволжский федеральный округ, 420107, РФ +address: + cinema: Гранд синема + city: Казань + city_district: Вахитовский район + country: РФ + country_code: ru + county: городской округ Казань + house_number: '6' + postcode: '420107' + road: Спартаковская улица + state: Татарстан + suburb: Старо-Татарская слобода +boundingbox: + - '55.7780934' + - '55.7782934' + - '49.1295756' + - '49.1297756' diff --git a/holidays/nominatim_cache/ru_tuva.yaml b/holidays/nominatim_cache/ru_tuva.yaml new file mode 100644 index 00000000..d09a356f --- /dev/null +++ b/holidays/nominatim_cache/ru_tuva.yaml @@ -0,0 +1,19 @@ +--- +place_id: '18401991' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '1775539006' +lat: '51.6508488' +lon: '94.2090227' +display_name: Ээрбек, Кызылский кожуун, Республика Тыва, Сибирский федеральный округ, РФ +address: + country: РФ + country_code: ru + county: Кызылский кожуун + state: Республика Тыва + village: Ээрбек +boundingbox: + - '51.6108488' + - '51.6908488' + - '94.1690227' + - '94.2490227' diff --git a/holidays/nominatim_cache/ru_udmurtia.yaml b/holidays/nominatim_cache/ru_udmurtia.yaml new file mode 100644 index 00000000..49e78d09 --- /dev/null +++ b/holidays/nominatim_cache/ru_udmurtia.yaml @@ -0,0 +1,24 @@ +--- +place_id: '78599984' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '59171598' +lat: '56.86426315' +lon: '53.2058149501383' +display_name: 390, улица Карла Маркса, Октябрьский район, Ижевск, городской округ Ижевск, Ижевск, Приволжский федеральный + округ, 426001, РФ +address: + city: Ижевск + city_district: Октябрьский район + country: РФ + country_code: ru + county: городской округ Ижевск + house_number: '390' + postcode: '426001' + road: улица Карла Маркса + state: Приволжский федеральный округ +boundingbox: + - '56.8642099' + - '56.8643125' + - '53.2057246' + - '53.2059065' diff --git a/holidays/nominatim_cache/se.yaml b/holidays/nominatim_cache/se.yaml new file mode 100644 index 00000000..33fbf823 --- /dev/null +++ b/holidays/nominatim_cache/se.yaml @@ -0,0 +1,19 @@ +--- +place_id: '204401325' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: relation +osm_id: '6916560' +lat: '62.97310575' +lon: '16.688879672278' +display_name: Fors distrikt, Ragunda kommun, Jämtlands län, Norrland, Sverige +address: + country: Sverige + country_code: se + # city_district: Fors distrikt + # county: Ragunda kommun + # state: Jämtlands län +boundingbox: + - '62.8082014' + - '63.1328469' + - '16.3948464' + - '16.9987048' diff --git a/holidays/nominatim_cache/sk.yaml b/holidays/nominatim_cache/sk.yaml new file mode 100644 index 00000000..36049aff --- /dev/null +++ b/holidays/nominatim_cache/sk.yaml @@ -0,0 +1,19 @@ +--- +place_id: '159383529' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: relation +osm_id: '2265337' +lat: '48.7277343' +lon: '19.4526017645988' +display_name: Ľubietová, okres Banská Bystrica, Banskobystrický kraj, Stredné Slovensko, Slovensko +address: + country: Slovensko + country_code: sk + # city: okres Banská Bystrica + # city_district: Ľubietová + # state: Banskobystrický kraj +boundingbox: + - '48.6827805' + - '48.7725606' + - '19.3237872' + - '19.504476' diff --git a/holidays/nominatim_cache/us_ak.yaml b/holidays/nominatim_cache/us_ak.yaml new file mode 100644 index 00000000..a4e6be1d --- /dev/null +++ b/holidays/nominatim_cache/us_ak.yaml @@ -0,0 +1,21 @@ +--- +place_id: '58953370' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '8984498' +lat: '64.5093904' +lon: '-165.4064219' +display_name: North Star Assoc Access Road, Nome, Alaska, 99762, United States of America +address: + city: Nome + country: United States of America + country_code: us + county: Nome + postcode: '99762' + road: North Star Assoc Access Road + state: Alaska +boundingbox: + - '64.5074306' + - '64.5108657' + - '-165.4093613' + - '-165.4050033' diff --git a/holidays/nominatim_cache/us_al.yaml b/holidays/nominatim_cache/us_al.yaml new file mode 100644 index 00000000..d81c9f4a --- /dev/null +++ b/holidays/nominatim_cache/us_al.yaml @@ -0,0 +1,22 @@ +--- +place_id: '200981368' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '460432302' +lat: '32.3670408' +lon: '-86.2980037714481' +display_name: Tuscaloosa Park, Genetta Court, Montgomery, Montgomery County, Alabama, 36104, United States of America +address: + city: Montgomery + country: United States of America + country_code: us + county: Montgomery County + park: Tuscaloosa Park + postcode: '36104' + road: Genetta Court + state: Alabama +boundingbox: + - '32.3666695' + - '32.3673896' + - '-86.2984317' + - '-86.297587' diff --git a/holidays/nominatim_cache/us_ar.yaml b/holidays/nominatim_cache/us_ar.yaml new file mode 100644 index 00000000..e9044086 --- /dev/null +++ b/holidays/nominatim_cache/us_ar.yaml @@ -0,0 +1,23 @@ +--- +place_id: '52073511' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '3837336913' +lat: '34.7466489' +lon: '-92.2904612' +display_name: Fallen Fire Fights of Arkansas, Capitol Mall, Little Rock, Pulaski County, Arkansas, 72201, United States of + America +address: + city: Little Rock + country: United States of America + country_code: us + county: Pulaski County + memorial: Fallen Fire Fights of Arkansas + postcode: '72201' + road: Capitol Mall + state: Arkansas +boundingbox: + - '34.7465489' + - '34.7467489' + - '-92.2905612' + - '-92.2903612' diff --git a/holidays/nominatim_cache/us_az.yaml b/holidays/nominatim_cache/us_az.yaml new file mode 100644 index 00000000..fb283c70 --- /dev/null +++ b/holidays/nominatim_cache/us_az.yaml @@ -0,0 +1,19 @@ +--- +place_id: '128696839' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '284558228' +lat: '34.9381065' +lon: '-109.7597016' +display_name: Blue Mesa Trail, Apache County, Arizona, United States of America +address: + country: United States of America + country_code: us + county: Apache County + footway: Blue Mesa Trail + state: Arizona +boundingbox: + - '34.9361754' + - '34.939458' + - '-109.7611979' + - '-109.756191' diff --git a/holidays/nominatim_cache/us_ca.yaml b/holidays/nominatim_cache/us_ca.yaml new file mode 100644 index 00000000..85ff35ff --- /dev/null +++ b/holidays/nominatim_cache/us_ca.yaml @@ -0,0 +1,22 @@ +--- +place_id: '16145752' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '1491131029' +lat: '40.7997997' +lon: '-124.1704455' +display_name: Sole Savers Used Cars, 7th Street, Eureka, Humboldt County, California, 95501, United States of America +address: + car: Sole Savers Used Cars + city: Eureka + country: United States of America + country_code: us + county: Humboldt County + postcode: '95501' + road: 7th Street + state: California +boundingbox: + - '40.7996997' + - '40.7998997' + - '-124.1705455' + - '-124.1703455' diff --git a/holidays/nominatim_cache/us_co.yaml b/holidays/nominatim_cache/us_co.yaml new file mode 100644 index 00000000..e74b26c1 --- /dev/null +++ b/holidays/nominatim_cache/us_co.yaml @@ -0,0 +1,20 @@ +--- +place_id: '131102333' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '292950875' +lat: '39.179721' +lon: '-106.8236546' +display_name: West Side, Pitkin County, Colorado, 81611, United States of America +address: + country: United States of America + country_code: us + county: Pitkin County + path: West Side + postcode: '81611' + state: Colorado +boundingbox: + - '39.1790348' + - '39.1808899' + - '-106.825368' + - '-106.8217973' diff --git a/holidays/nominatim_cache/us_ct.yaml b/holidays/nominatim_cache/us_ct.yaml new file mode 100644 index 00000000..82526460 --- /dev/null +++ b/holidays/nominatim_cache/us_ct.yaml @@ -0,0 +1,22 @@ +--- +place_id: '22052698' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '2164630561' +lat: '41.9112481' +lon: '-72.1601502' +display_name: Pixi Falls, Nipmuck Trail, Westford, Windham County, Connecticut, 06278, United States of America +address: + country: United States of America + country_code: us + county: Windham County + footway: Nipmuck Trail + hamlet: Westford + postcode: 06278 + state: Connecticut + viewpoint: Pixi Falls +boundingbox: + - '41.9111481' + - '41.9113481' + - '-72.1602502' + - '-72.1600502' diff --git a/holidays/nominatim_cache/us_dc.yaml b/holidays/nominatim_cache/us_dc.yaml new file mode 100644 index 00000000..5ebfa157 --- /dev/null +++ b/holidays/nominatim_cache/us_dc.yaml @@ -0,0 +1,20 @@ +--- +place_id: '203341249' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '50428538' +lat: '38.895236' +lon: '-77.0365533' +display_name: E St NW, Washington, District of Columbia, 20006, United States of America +address: + city: Washington + country: United States of America + country_code: us + postcode: '20006' + road: E St NW + state: District of Columbia +boundingbox: + - '38.895236' + - '38.8955003' + - '-77.0394723' + - '-77.0335985' diff --git a/holidays/nominatim_cache/us_de.yaml b/holidays/nominatim_cache/us_de.yaml new file mode 100644 index 00000000..be08c327 --- /dev/null +++ b/holidays/nominatim_cache/us_de.yaml @@ -0,0 +1,24 @@ +--- +place_id: '166277308' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '166277308' +lat: '38.7111000373533' +lon: '-75.0978915260284' +display_name: 37414, Oyster House Road, Rehoboth Crossing, Phil Mar Estates, Sussex County, Delaware, 19971, United States + of America +address: + country: United States of America + country_code: us + county: Sussex County + hamlet: Phil Mar Estates + house_number: '37414' + neighbourhood: Rehoboth Crossing + postcode: '19971' + road: Oyster House Road + state: Delaware +boundingbox: + - '38.711000037353' + - '38.711200037353' + - '-75.097991526028' + - '-75.097791526028' diff --git a/holidays/nominatim_cache/us_fl.yaml b/holidays/nominatim_cache/us_fl.yaml new file mode 100644 index 00000000..2fb48420 --- /dev/null +++ b/holidays/nominatim_cache/us_fl.yaml @@ -0,0 +1,22 @@ +--- +place_id: '156339763' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '435731769' +lat: '25.77223905' +lon: '-80.132749245701' +display_name: 304, Ocean Drive, Miami Beach, Miami-Dade County, Florida, 33139, United States of America +address: + city: Miami Beach + country: United States of America + country_code: us + county: Miami-Dade County + house_number: '304' + postcode: '33139' + road: Ocean Drive + state: Florida +boundingbox: + - '25.7721541' + - '25.7723116' + - '-80.1329134' + - '-80.1325851' diff --git a/holidays/nominatim_cache/us_ga.yaml b/holidays/nominatim_cache/us_ga.yaml new file mode 100644 index 00000000..34ddd1f8 --- /dev/null +++ b/holidays/nominatim_cache/us_ga.yaml @@ -0,0 +1,20 @@ +--- +place_id: '58855558' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '9260878' +lat: '31.083523' +lon: '-81.4209829' +display_name: Jennings Road, Glynn County, Georgia, 31527, United States of America +address: + country: United States of America + country_code: us + county: Glynn County + postcode: '31527' + road: Jennings Road + state: Georgia +boundingbox: + - '31.083011' + - '31.083869' + - '-81.4221379' + - '-81.4197649' diff --git a/holidays/nominatim_cache/us_gu.yaml b/holidays/nominatim_cache/us_gu.yaml new file mode 100644 index 00000000..64124c5f --- /dev/null +++ b/holidays/nominatim_cache/us_gu.yaml @@ -0,0 +1,20 @@ +--- +place_id: '73676593' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '36979005' +lat: '13.4188011' +lon: '144.6577079' +display_name: Marine Corps Drive, Apra Harbor, Guam County, Guam, United States of America +address: + country: United States of America + country_code: us + county: Guam County + locality: Apra Harbor + road: Marine Corps Drive + state: Guam +boundingbox: + - '13.4172553' + - '13.4386012' + - '144.6522975' + - '144.6755136' diff --git a/holidays/nominatim_cache/us_hi.yaml b/holidays/nominatim_cache/us_hi.yaml new file mode 100644 index 00000000..cf72a133 --- /dev/null +++ b/holidays/nominatim_cache/us_hi.yaml @@ -0,0 +1,20 @@ +--- +place_id: '76187181' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '45698610' +lat: '19.62918' +lon: '-155.5398599' +display_name: Hilo Kona Road, Kailua-Kona, Hawaii, United States of America +address: + city: Kailua-Kona + country: United States of America + country_code: us + county: Hawaii + road: Hilo Kona Road + state: Hawaii +boundingbox: + - '19.621556' + - '19.63689' + - '-155.5977739' + - '-155.4812899' diff --git a/holidays/nominatim_cache/us_ia.yaml b/holidays/nominatim_cache/us_ia.yaml new file mode 100644 index 00000000..f7b4afdf --- /dev/null +++ b/holidays/nominatim_cache/us_ia.yaml @@ -0,0 +1,22 @@ +--- +place_id: '107184239' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '185310640' +lat: '41.9750617' +lon: '-91.6757381247816' +display_name: Linn County Sheriffs Department, I 380;IA 27, Cedar Rapids, Linn County, Iowa, 52405, United States of America +address: + city: Cedar Rapids + country: United States of America + country_code: us + county: Linn County + police: Linn County Sheriffs Department + postcode: '52405' + road: I 380;IA 27 + state: Iowa +boundingbox: + - '41.9746194' + - '41.975391' + - '-91.6759376' + - '-91.675391' diff --git a/holidays/nominatim_cache/us_id.yaml b/holidays/nominatim_cache/us_id.yaml new file mode 100644 index 00000000..3edacbc4 --- /dev/null +++ b/holidays/nominatim_cache/us_id.yaml @@ -0,0 +1,22 @@ +--- +place_id: '169288272' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '169288272' +lat: '47.6709979388862' +lon: '-116.766979866231' +display_name: 302, South Dollar Street, Coeur d'Alene, Kootenai County, Idaho, 83814, United States of America +address: + city: Coeur d'Alene + country: United States of America + country_code: us + county: Kootenai County + house_number: '302' + postcode: '83814' + road: South Dollar Street + state: Idaho +boundingbox: + - '47.670897938886' + - '47.671097938886' + - '-116.76707986623' + - '-116.76687986623' diff --git a/holidays/nominatim_cache/us_il.yaml b/holidays/nominatim_cache/us_il.yaml new file mode 100644 index 00000000..8612fc5e --- /dev/null +++ b/holidays/nominatim_cache/us_il.yaml @@ -0,0 +1,24 @@ +--- +place_id: '72433317' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '33908928' +lat: '42.05189995' +lon: '-87.6759578506092' +display_name: University Hall, 1897, Sheridan Road, Downtown, Evanston, Cook County, Illinois, 60208, United States of America +address: + building: University Hall + city: Evanston + country: United States of America + country_code: us + county: Cook County + house_number: '1897' + neighbourhood: Downtown + postcode: '60208' + road: Sheridan Road + state: Illinois +boundingbox: + - '42.0517375' + - '42.0520571' + - '-87.6761203' + - '-87.6757928' diff --git a/holidays/nominatim_cache/us_in.yaml b/holidays/nominatim_cache/us_in.yaml new file mode 100644 index 00000000..5434db59 --- /dev/null +++ b/holidays/nominatim_cache/us_in.yaml @@ -0,0 +1,22 @@ +--- +place_id: '171578227' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '171578227' +lat: '40.418118' +lon: '-86.896985' +display_name: 39, Columbia Street, Happy Hollow Heights, Tippecanoe County, Indiana, 47901, United States of America +address: + country: United States of America + country_code: us + county: Tippecanoe County + hamlet: Happy Hollow Heights + house_number: '39' + postcode: '47901' + road: Columbia Street + state: Indiana +boundingbox: + - '40.418018' + - '40.418218' + - '-86.897085' + - '-86.896885' diff --git a/holidays/nominatim_cache/us_ks.yaml b/holidays/nominatim_cache/us_ks.yaml new file mode 100644 index 00000000..71d6ba41 --- /dev/null +++ b/holidays/nominatim_cache/us_ks.yaml @@ -0,0 +1,22 @@ +--- +place_id: '101355560' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '161510053' +lat: '37.6887661' +lon: '-97.3278952567447' +display_name: Old Town Parking Garage, North Rock Island, Wichita, Sedgwick County, Kansas, 67202, United States of America +address: + city: Wichita + country: United States of America + country_code: us + county: Sedgwick County + parking: Old Town Parking Garage + postcode: '67202' + road: North Rock Island + state: Kansas +boundingbox: + - '37.6885241' + - '37.6890067' + - '-97.328133' + - '-97.3276582' diff --git a/holidays/nominatim_cache/us_ky.yaml b/holidays/nominatim_cache/us_ky.yaml new file mode 100644 index 00000000..54aa21da --- /dev/null +++ b/holidays/nominatim_cache/us_ky.yaml @@ -0,0 +1,21 @@ +--- +place_id: '63111545' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '16198892' +lat: '36.844965' +lon: '-83.3193679' +display_name: KY 38, Harlan, Harlan County, Kentucky, 40831, United States of America +address: + city: Harlan + country: United States of America + country_code: us + county: Harlan County + postcode: '40831' + road: KY 38 + state: Kentucky +boundingbox: + - '36.844271' + - '36.848028' + - '-83.3245209' + - '-83.3149779' diff --git a/holidays/nominatim_cache/us_la.yaml b/holidays/nominatim_cache/us_la.yaml new file mode 100644 index 00000000..5f4f190f --- /dev/null +++ b/holidays/nominatim_cache/us_la.yaml @@ -0,0 +1,18 @@ +--- +place_id: '159480624' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: relation +osm_id: '1836431' +lat: '30.4243909' +lon: '-89.973038' +display_name: St. Tammany Parish, Louisiana, United States of America +address: + country: United States of America + country_code: us + county: St. Tammany Parish + state: Louisiana +boundingbox: + - '30.1389906' + - '30.712402' + - '-90.2566829' + - '-89.4949729' diff --git a/holidays/nominatim_cache/us_ma.yaml b/holidays/nominatim_cache/us_ma.yaml new file mode 100644 index 00000000..5923f826 --- /dev/null +++ b/holidays/nominatim_cache/us_ma.yaml @@ -0,0 +1,26 @@ +--- +place_id: '68045673' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '24677646' +lat: '42.35546545' +lon: '-71.0638843757496' +display_name: Visitor Information Center at Boston Common, 148, Tremont Street, Chinatown, Beacon Hill, Boston, Suffolk County, + Massachusetts, 02111, United States of America +address: + city: Boston + country: United States of America + country_code: us + county: Suffolk County + house_number: '148' + information: Visitor Information Center at Boston Common + neighbourhood: Chinatown + postcode: '02111' + road: Tremont Street + state: Massachusetts + suburb: Beacon Hill +boundingbox: + - '42.3553774' + - '42.3555517' + - '-71.0640413' + - '-71.0637728' diff --git a/holidays/nominatim_cache/us_md.yaml b/holidays/nominatim_cache/us_md.yaml new file mode 100644 index 00000000..58ab3c44 --- /dev/null +++ b/holidays/nominatim_cache/us_md.yaml @@ -0,0 +1,21 @@ +--- +place_id: '76762706' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '47701025' +lat: '38.3152772' +lon: '-75.6248896' +display_name: South Fruitland Boulevard, Fruitland, Wicomico County, Maryland, 21826, United States of America +address: + city: Fruitland + country: United States of America + country_code: us + county: Wicomico County + postcode: '21826' + road: South Fruitland Boulevard + state: Maryland +boundingbox: + - '38.306383' + - '38.3222886' + - '-75.6313919' + - '-75.6197739' diff --git a/holidays/nominatim_cache/us_me.yaml b/holidays/nominatim_cache/us_me.yaml new file mode 100644 index 00000000..6a09c54c --- /dev/null +++ b/holidays/nominatim_cache/us_me.yaml @@ -0,0 +1,21 @@ +--- +place_id: '75292496' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '43376862' +lat: '44.7904848' +lon: '-68.7829047111113' +display_name: Bangor Raceway/OTB, Bangor, Penobscot County, Maine, 04401, United States of America +address: + city: Bangor + country: United States of America + country_code: us + county: Penobscot County + postcode: '04401' + raceway: Bangor Raceway/OTB + state: Maine +boundingbox: + - '44.789226' + - '44.7917492' + - '-68.7847403' + - '-68.7810856' diff --git a/holidays/nominatim_cache/us_mi.yaml b/holidays/nominatim_cache/us_mi.yaml new file mode 100644 index 00000000..10dcde6c --- /dev/null +++ b/holidays/nominatim_cache/us_mi.yaml @@ -0,0 +1,25 @@ +--- +place_id: '125082031' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '264540336' +lat: '42.71532985' +lon: '-84.4995249806439' +display_name: Building 1572, 30, Middlevale Road, Spartan Village, East Lansing, Ingham County, Michigan, 48823, United States + of America +address: + building: Building 1572 + city: East Lansing + country: United States of America + country_code: us + county: Ingham County + house_number: '30' + postcode: '48823' + residential: Spartan Village + road: Middlevale Road + state: Michigan +boundingbox: + - '42.7151622' + - '42.7154709' + - '-84.4997235' + - '-84.4992914' diff --git a/holidays/nominatim_cache/us_mn.yaml b/holidays/nominatim_cache/us_mn.yaml new file mode 100644 index 00000000..207ef520 --- /dev/null +++ b/holidays/nominatim_cache/us_mn.yaml @@ -0,0 +1,19 @@ +--- +place_id: '78231263' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '56684658' +lat: '47.8397542' +lon: '-90.0551622' +display_name: Superior Hiking Trail, Cook County, Minnesota, United States of America +address: + country: United States of America + country_code: us + county: Cook County + footway: Superior Hiking Trail + state: Minnesota +boundingbox: + - '47.8194609' + - '47.8667421' + - '-90.0610767' + - '-90.0456654' diff --git a/holidays/nominatim_cache/us_mo.yaml b/holidays/nominatim_cache/us_mo.yaml new file mode 100644 index 00000000..f964c557 --- /dev/null +++ b/holidays/nominatim_cache/us_mo.yaml @@ -0,0 +1,21 @@ +--- +place_id: '65857572' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '18514619' +lat: '37.08136' +lon: '-94.5070289' +display_name: Iowa Avenue, Joplin, Jasper County, Missouri, 64801, United States of America +address: + city: Joplin + country: United States of America + country_code: us + county: Jasper County + postcode: '64801' + road: Iowa Avenue + state: Missouri +boundingbox: + - '37.080104' + - '37.08136' + - '-94.5070779' + - '-94.5070289' diff --git a/holidays/nominatim_cache/us_ms.yaml b/holidays/nominatim_cache/us_ms.yaml new file mode 100644 index 00000000..02053dae --- /dev/null +++ b/holidays/nominatim_cache/us_ms.yaml @@ -0,0 +1,22 @@ +--- +place_id: '102384531' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '165919984' +lat: '30.3984797' +lon: '-88.8818930732571' +display_name: 189, Bellman Street, Biloxi, Harrison County, Mississippi, 39501, United States of America +address: + city: Biloxi + country: United States of America + country_code: us + county: Harrison County + house_number: '189' + postcode: '39501' + road: Bellman Street + state: Mississippi +boundingbox: + - '30.398439' + - '30.3985265' + - '-88.881947' + - '-88.8818391' diff --git a/holidays/nominatim_cache/us_mt.yaml b/holidays/nominatim_cache/us_mt.yaml new file mode 100644 index 00000000..3d4f3b0c --- /dev/null +++ b/holidays/nominatim_cache/us_mt.yaml @@ -0,0 +1,22 @@ +--- +place_id: '179036884' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '179036884' +lat: '48.3865075440761' +lon: '-115.549835656446' +display_name: 426, East 9th Street, Libby, Lincoln County, Montana, 59923, United States of America +address: + city: Libby + country: United States of America + country_code: us + county: Lincoln County + house_number: '426' + postcode: '59923' + road: East 9th Street + state: Montana +boundingbox: + - '48.386407544076' + - '48.386607544076' + - '-115.54993565645' + - '-115.54973565645' diff --git a/holidays/nominatim_cache/us_nc.yaml b/holidays/nominatim_cache/us_nc.yaml new file mode 100644 index 00000000..53ff84a9 --- /dev/null +++ b/holidays/nominatim_cache/us_nc.yaml @@ -0,0 +1,25 @@ +--- +place_id: '107570419' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '189846068' +lat: '35.7804055' +lon: '-78.639099844006' +display_name: Union Square, East Edenton Street, Historic Oakwood, Warehouse District, Raleigh, Wake County, North Carolina, + 27601, United States of America +address: + city: Raleigh + country: United States of America + country_code: us + county: Wake County + neighbourhood: Historic Oakwood + park: Union Square + postcode: '27601' + road: East Edenton Street + state: North Carolina + suburb: Warehouse District +boundingbox: + - '35.7796269' + - '35.7811801' + - '-78.6400488' + - '-78.6381485' diff --git a/holidays/nominatim_cache/us_nd.yaml b/holidays/nominatim_cache/us_nd.yaml new file mode 100644 index 00000000..3384501a --- /dev/null +++ b/holidays/nominatim_cache/us_nd.yaml @@ -0,0 +1,22 @@ +--- +place_id: '183480441' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '183480441' +lat: '48.145912877551' +lon: '-103.623120673469' +display_name: 248, 1st Avenue West, Williston, Williams County, North Dakota, 58801, United States of America +address: + city: Williston + country: United States of America + country_code: us + county: Williams County + house_number: '248' + postcode: '58801' + road: 1st Avenue West + state: North Dakota +boundingbox: + - '48.145812877551' + - '48.146012877551' + - '-103.62322067347' + - '-103.62302067347' diff --git a/holidays/nominatim_cache/us_ne.yaml b/holidays/nominatim_cache/us_ne.yaml new file mode 100644 index 00000000..c22fc829 --- /dev/null +++ b/holidays/nominatim_cache/us_ne.yaml @@ -0,0 +1,25 @@ +--- +place_id: '123326890' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '256624885' +lat: '41.25918915' +lon: '-95.9378725469971' +display_name: First National Bank Tower, 1601, Dodge Street, East Omaha, Omaha, Douglas County, Nebraska, 68102, United States + of America +address: + building: First National Bank Tower + city: Omaha + country: United States of America + country_code: us + county: Douglas County + house_number: '1601' + postcode: '68102' + road: Dodge Street + state: Nebraska + suburb: East Omaha +boundingbox: + - '41.2587862' + - '41.2595745' + - '-95.938314' + - '-95.9373707' diff --git a/holidays/nominatim_cache/us_nh.yaml b/holidays/nominatim_cache/us_nh.yaml new file mode 100644 index 00000000..fd3fe519 --- /dev/null +++ b/holidays/nominatim_cache/us_nh.yaml @@ -0,0 +1,21 @@ +--- +place_id: '65794747' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '18851394' +lat: '43.560882' +lon: '-71.9468629' +display_name: Library Road, Grafton, Grafton County, New Hampshire, 03240, United States of America +address: + country: United States of America + country_code: us + county: Grafton County + postcode: '03240' + road: Library Road + state: New Hampshire + town: Grafton +boundingbox: + - '43.5590194' + - '43.56179' + - '-71.9501249' + - '-71.9442659' diff --git a/holidays/nominatim_cache/us_nj.yaml b/holidays/nominatim_cache/us_nj.yaml new file mode 100644 index 00000000..e92ae38a --- /dev/null +++ b/holidays/nominatim_cache/us_nj.yaml @@ -0,0 +1,21 @@ +--- +place_id: '60288526' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '11599192' +lat: '39.9493876' +lon: '-75.1077565' +display_name: Centennial Drive, Camden, Camden County, New Jersey, 08101, United States of America +address: + city: Camden + country: United States of America + country_code: us + county: Camden County + postcode: 08101 + road: Centennial Drive + state: New Jersey +boundingbox: + - '39.949268' + - '39.9493876' + - '-75.1077565' + - '-75.1071713' diff --git a/holidays/nominatim_cache/us_nm.yaml b/holidays/nominatim_cache/us_nm.yaml new file mode 100644 index 00000000..0b335c80 --- /dev/null +++ b/holidays/nominatim_cache/us_nm.yaml @@ -0,0 +1,19 @@ +--- +place_id: '85918785' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '104970602' +lat: '34.0684393' +lon: '-107.6114804' +display_name: Old Highway 60, Socorro County, New Mexico, United States of America +address: + country: United States of America + country_code: us + county: Socorro County + road: Old Highway 60 + state: New Mexico +boundingbox: + - '34.0637822' + - '34.0730885' + - '-107.6270774' + - '-107.5969656' diff --git a/holidays/nominatim_cache/us_nv.yaml b/holidays/nominatim_cache/us_nv.yaml new file mode 100644 index 00000000..91250b18 --- /dev/null +++ b/holidays/nominatim_cache/us_nv.yaml @@ -0,0 +1,25 @@ +--- +place_id: '205612016' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '4668742174' +lat: '36.1221426' +lon: '-115.1703423' +display_name: Fat Tuesday, 3355, South Las Vegas Boulevard, Hughes Center, Paradise, Clark County, Nevada, 89109, United States + of America +address: + bar: Fat Tuesday + country: United States of America + country_code: us + county: Clark County + house_number: '3355' + locality: Paradise + postcode: '89109' + road: South Las Vegas Boulevard + state: Nevada + suburb: Hughes Center +boundingbox: + - '36.1220426' + - '36.1222426' + - '-115.1704423' + - '-115.1702423' diff --git a/holidays/nominatim_cache/us_ny.yaml b/holidays/nominatim_cache/us_ny.yaml new file mode 100644 index 00000000..c61e7d2d --- /dev/null +++ b/holidays/nominatim_cache/us_ny.yaml @@ -0,0 +1,23 @@ +--- +place_id: '92837005' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '126855890' +lat: '42.81240725' +lon: '-73.9381958169258' +display_name: Franklin Plaza, Lafayette Street, City of Schenectady, Schenectady County, New York, 12305, United States of + America +address: + building: Franklin Plaza + city: City of Schenectady + country: United States of America + country_code: us + county: Schenectady County + postcode: '12305' + road: Lafayette Street + state: New York +boundingbox: + - '42.812197' + - '42.8126735' + - '-73.9384539' + - '-73.9377289' diff --git a/holidays/nominatim_cache/us_oh.yaml b/holidays/nominatim_cache/us_oh.yaml new file mode 100644 index 00000000..2fef4725 --- /dev/null +++ b/holidays/nominatim_cache/us_oh.yaml @@ -0,0 +1,20 @@ +--- +place_id: '66256326' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '19039813' +lat: '41.4843124' +lon: '-82.6844091' +display_name: Perimeter Road, Sandusky, Erie County, Ohio, United States of America +address: + country: United States of America + country_code: us + county: Erie County + road: Perimeter Road + state: Ohio + town: Sandusky +boundingbox: + - '41.482416' + - '41.4858906' + - '-82.6859203' + - '-82.6827925' diff --git a/holidays/nominatim_cache/us_ok.yaml b/holidays/nominatim_cache/us_ok.yaml new file mode 100644 index 00000000..0b574306 --- /dev/null +++ b/holidays/nominatim_cache/us_ok.yaml @@ -0,0 +1,22 @@ +--- +place_id: '185330470' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '185330470' +lat: '36.0514724693878' +lon: '-95.7892149183673' +display_name: 208, East Commercial Street, Broken Arrow, Tulsa County, Oklahoma, 74012, United States of America +address: + city: Broken Arrow + country: United States of America + country_code: us + county: Tulsa County + house_number: '208' + postcode: '74012' + road: East Commercial Street + state: Oklahoma +boundingbox: + - '36.051372469388' + - '36.051572469388' + - '-95.789314918367' + - '-95.789114918367' diff --git a/holidays/nominatim_cache/us_or.yaml b/holidays/nominatim_cache/us_or.yaml new file mode 100644 index 00000000..475518d1 --- /dev/null +++ b/holidays/nominatim_cache/us_or.yaml @@ -0,0 +1,19 @@ +--- +place_id: '96589798' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '146985872' +lat: '45.3810394' +lon: '-121.6699837' +display_name: 'Cooper Spur #600B, Hood River County, Oregon, United States of America' +address: + country: United States of America + country_code: us + county: Hood River County + footway: 'Cooper Spur #600B' + state: Oregon +boundingbox: + - '45.374949' + - '45.389776' + - '-121.6823709' + - '-121.6591949' diff --git a/holidays/nominatim_cache/us_pa.yaml b/holidays/nominatim_cache/us_pa.yaml new file mode 100644 index 00000000..bb580473 --- /dev/null +++ b/holidays/nominatim_cache/us_pa.yaml @@ -0,0 +1,22 @@ +--- +place_id: '126942958' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '260794611' +lat: '40.3340718' +lon: '-75.9294293956808' +display_name: Parking Garage, Cherry Street, Reading, Berks County, Pennsylvania, 19602, United States of America +address: + city: Reading + country: United States of America + country_code: us + county: Berks County + parking: Parking Garage + postcode: '19602' + road: Cherry Street + state: Pennsylvania +boundingbox: + - '40.3337776' + - '40.3343481' + - '-75.9298373' + - '-75.9290223' diff --git a/holidays/nominatim_cache/us_pr.yaml b/holidays/nominatim_cache/us_pr.yaml new file mode 100644 index 00000000..561de493 --- /dev/null +++ b/holidays/nominatim_cache/us_pr.yaml @@ -0,0 +1,22 @@ +--- +place_id: '151644940' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '403549170' +lat: '18.4363991' +lon: '-66.1186141' +display_name: 25, Calle Coll Y Toste, Pueblo Viejo, Guaynabo, Puerto Rico, 00965, United States of America +address: + city: Pueblo Viejo + country: United States of America + country_code: us + county: Guaynabo + house_number: '25' + postcode: 00965 + road: Calle Coll Y Toste + state: Puerto Rico +boundingbox: + - '18.4363456' + - '18.4364526' + - '-66.1187034' + - '-66.1185248' diff --git a/holidays/nominatim_cache/us_ri.yaml b/holidays/nominatim_cache/us_ri.yaml new file mode 100644 index 00000000..c679acc4 --- /dev/null +++ b/holidays/nominatim_cache/us_ri.yaml @@ -0,0 +1,21 @@ +--- +place_id: '93306406' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '123069111' +lat: '41.82518' +lon: '-71.4193269' +display_name: I 95, Providence, Providence County, Rhode Island, 02903, United States of America +address: + city: Providence + country: United States of America + country_code: us + county: Providence County + postcode: 02903 + road: I 95 + state: Rhode Island +boundingbox: + - '41.8248409' + - '41.825844' + - '-71.4194506' + - '-71.4190899' diff --git a/holidays/nominatim_cache/us_sc.yaml b/holidays/nominatim_cache/us_sc.yaml new file mode 100644 index 00000000..0f3e7292 --- /dev/null +++ b/holidays/nominatim_cache/us_sc.yaml @@ -0,0 +1,22 @@ +--- +place_id: '120315788' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '241968972' +lat: '32.78764065' +lon: '-79.9386668786502' +display_name: Dream Factory, Warren Street, Charleston, Charleston County, South Carolina, 29403, United States of America +address: + building: Dream Factory + city: Charleston + country: United States of America + country_code: us + county: Charleston County + postcode: '29403' + road: Warren Street + state: South Carolina +boundingbox: + - '32.787503' + - '32.7877555' + - '-79.9387808' + - '-79.9385305' diff --git a/holidays/nominatim_cache/us_sd.yaml b/holidays/nominatim_cache/us_sd.yaml new file mode 100644 index 00000000..c28fa421 --- /dev/null +++ b/holidays/nominatim_cache/us_sd.yaml @@ -0,0 +1,22 @@ +--- +place_id: '80182180' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '73851137' +lat: '43.71474935' +lon: '-98.0248767861259' +display_name: Mitchell Corn Palace, East 6th Avenue, Mitchell, Davison County, South Dakota, 57301, United States of America +address: + attraction: Mitchell Corn Palace + city: Mitchell + country: United States of America + country_code: us + county: Davison County + postcode: '57301' + road: East 6th Avenue + state: South Dakota +boundingbox: + - '43.7145656' + - '43.7149864' + - '-98.0254572' + - '-98.0242946' diff --git a/holidays/nominatim_cache/us_tn.yaml b/holidays/nominatim_cache/us_tn.yaml new file mode 100644 index 00000000..2fcb0bc9 --- /dev/null +++ b/holidays/nominatim_cache/us_tn.yaml @@ -0,0 +1,21 @@ +--- +place_id: '91498913' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '124068656' +lat: '35.1386836' +lon: '-90.0240493' +display_name: I 240, Memphis, Shelby County, Tennessee, 38104, United States of America +address: + city: Memphis + country: United States of America + country_code: us + county: Shelby County + postcode: '38104' + road: I 240 + state: Tennessee +boundingbox: + - '35.1330743' + - '35.1442679' + - '-90.0243153' + - '-90.022631' diff --git a/holidays/nominatim_cache/us_tx.yaml b/holidays/nominatim_cache/us_tx.yaml new file mode 100644 index 00000000..d78593b9 --- /dev/null +++ b/holidays/nominatim_cache/us_tx.yaml @@ -0,0 +1,21 @@ +--- +place_id: '121628610' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '238575801' +lat: '30.2657266' +lon: '-97.7556813' +display_name: Pfluger Pedestrian Bridge, Austin, Travis County, Texas, 78703, United States of America +address: + city: Austin + country: United States of America + country_code: us + county: Travis County + cycleway: Pfluger Pedestrian Bridge + postcode: '78703' + state: Texas +boundingbox: + - '30.2645742' + - '30.266268' + - '-97.7563459' + - '-97.7552115' diff --git a/holidays/nominatim_cache/us_ut.yaml b/holidays/nominatim_cache/us_ut.yaml new file mode 100644 index 00000000..c234e473 --- /dev/null +++ b/holidays/nominatim_cache/us_ut.yaml @@ -0,0 +1,22 @@ +--- +place_id: '124868801' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '257809595' +lat: '40.5886217' +lon: '-111.6378685' +display_name: Alta Lodge Tow, East Perruvian Acre Road, Alta, Salt Lake County, Utah, 84138, United States of America +address: + address29: Alta Lodge Tow + country: United States of America + country_code: us + county: Salt Lake County + postcode: '84138' + road: East Perruvian Acre Road + state: Utah + town: Alta +boundingbox: + - '40.5886217' + - '40.589815' + - '-111.6378685' + - '-111.6373543' diff --git a/holidays/nominatim_cache/us_va.yaml b/holidays/nominatim_cache/us_va.yaml new file mode 100644 index 00000000..cccefd1f --- /dev/null +++ b/holidays/nominatim_cache/us_va.yaml @@ -0,0 +1,21 @@ +--- +place_id: '77018985' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '48865930' +lat: '36.944657' +lon: '-76.2950104' +display_name: Bellinger Blvd, Merrimack Park, Norfolk, Virginia, 23511, United States of America +address: + city: Norfolk + country: United States of America + country_code: us + hamlet: Merrimack Park + postcode: '23511' + road: Bellinger Blvd + state: Virginia +boundingbox: + - '36.9427272' + - '36.944717' + - '-76.3043622' + - '-76.2860759' diff --git a/holidays/nominatim_cache/us_vi.yaml b/holidays/nominatim_cache/us_vi.yaml new file mode 100644 index 00000000..d8cdbd56 --- /dev/null +++ b/holidays/nominatim_cache/us_vi.yaml @@ -0,0 +1,23 @@ +--- +place_id: '2623808' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: node +osm_id: '356559537' +lat: '18.3430118' +lon: '-64.9354232' +display_name: Christ Church Methodist Church, Rosen Gade, Charlotte Amalie, St. Thomas Island, United States Virgin Islands, + 00803, United States of America +address: + country: United States of America + country_code: us + county: St. Thomas Island + place_of_worship: Christ Church Methodist Church + postcode: 00803 + road: Rosen Gade + state: United States Virgin Islands + town: Charlotte Amalie +boundingbox: + - '18.3429118' + - '18.3431118' + - '-64.9355232' + - '-64.9353232' diff --git a/holidays/nominatim_cache/us_vt.yaml b/holidays/nominatim_cache/us_vt.yaml new file mode 100644 index 00000000..566849f6 --- /dev/null +++ b/holidays/nominatim_cache/us_vt.yaml @@ -0,0 +1,22 @@ +--- +place_id: '120598380' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '244468089' +lat: '44.25920675' +lon: '-72.5796506738965' +display_name: 53, Memorial Drive, Montpelier, Washington County, Vermont, 05602, United States of America +address: + city: Montpelier + country: United States of America + country_code: us + county: Washington County + house_number: '53' + postcode: '05602' + road: Memorial Drive + state: Vermont +boundingbox: + - '44.2591659' + - '44.2592489' + - '-72.579719' + - '-72.5795828' diff --git a/holidays/nominatim_cache/us_wa.yaml b/holidays/nominatim_cache/us_wa.yaml new file mode 100644 index 00000000..f44c0f8d --- /dev/null +++ b/holidays/nominatim_cache/us_wa.yaml @@ -0,0 +1,19 @@ +--- +place_id: '134791139' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '316579342' +lat: '46.8606902' +lon: '-121.7462981' +display_name: Emmons Glacier Route, Pierce County, Washington, United States of America +address: + country: United States of America + country_code: us + county: Pierce County + path: Emmons Glacier Route + state: Washington +boundingbox: + - '46.8528966' + - '46.8703243' + - '-121.7604617' + - '-121.7330483' diff --git a/holidays/nominatim_cache/us_wi.yaml b/holidays/nominatim_cache/us_wi.yaml new file mode 100644 index 00000000..d6ca035f --- /dev/null +++ b/holidays/nominatim_cache/us_wi.yaml @@ -0,0 +1,20 @@ +--- +place_id: '66406310' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '21562994' +lat: '45.8707426' +lon: '-89.6984064' +display_name: Cedar Street, Minocqua, Oneida County, Wisconsin, United States of America +address: + country: United States of America + country_code: us + county: Oneida County + road: Cedar Street + state: Wisconsin + village: Minocqua +boundingbox: + - '45.8704' + - '45.8708238' + - '-89.6990159' + - '-89.697905' diff --git a/holidays/nominatim_cache/us_wv.yaml b/holidays/nominatim_cache/us_wv.yaml new file mode 100644 index 00000000..df3fd44a --- /dev/null +++ b/holidays/nominatim_cache/us_wv.yaml @@ -0,0 +1,21 @@ +--- +place_id: '63689957' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '15572790' +lat: '38.368065' +lon: '-81.6063089' +display_name: Barlow Drive, Twomile, Kanawha County, West Virginia, 25311, United States of America +address: + country: United States of America + country_code: us + county: Kanawha County + hamlet: Twomile + postcode: '25311' + road: Barlow Drive + state: West Virginia +boundingbox: + - '38.3587016' + - '38.3807117' + - '-81.6213396' + - '-81.5953362' diff --git a/holidays/nominatim_cache/us_wy.yaml b/holidays/nominatim_cache/us_wy.yaml new file mode 100644 index 00000000..13f4ebe3 --- /dev/null +++ b/holidays/nominatim_cache/us_wy.yaml @@ -0,0 +1,22 @@ +--- +place_id: '194626925' +licence: Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright +osm_type: way +osm_id: '194626925' +lat: '42.859091' +lon: '-106.312881' +display_name: 999, East H Street, Casper, Natrona County, Wyoming, 82601, United States of America +address: + city: Casper + country: United States of America + country_code: us + county: Natrona County + house_number: '999' + postcode: '82601' + road: East H Street + state: Wyoming +boundingbox: + - '42.858991' + - '42.859191' + - '-106.312981' + - '-106.312781' diff --git a/holidays/populate_nominatim_cache b/holidays/populate_nominatim_cache new file mode 100755 index 00000000..d430e270 --- /dev/null +++ b/holidays/populate_nominatim_cache @@ -0,0 +1,180 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Read _nominatim_url, get the query response and store it as YAML files below ./nominatim_cache. +""" + +from __future__ import absolute_import, division, print_function + +__version__ = '0.1.0' + +__license__ = 'AGPL-3.0' +__author__ = 'Robin Schneider ' +__copyright__ = 'Copyright (C) 2017 Robin Schneider ' + +__all__ = ['main'] + +import sys +import os +import re +import json +import logging +import argparse +from glob import iglob +from collections import OrderedDict +from copy import deepcopy + +if sys.version_info[0] == 2: + from io import open + +from ruamel import yaml +import requests + +from hc.yaml import dump_holidays_as_yaml + +LOG = logging.getLogger(__name__) + +NOMINATIM_SORTING = { + 'place_id': '10', + 'licence': '20', + 'osm_type': '30', + 'osm_id': '40', + 'lat': '50', + 'lon': '60', + 'display_name': '70', + 'address': '80', +} + +KEEP_STATE_LEVEL_ADDRESS_ATTRS = [ + 'country', + 'country_code', +] + + +def handle_nominatim_url(nominatim_url, country_holiday_def_file, state=None): + level = 'state' if type(state) == str else 'country' + country_code_re = re.match(r'.*?(?P\w+)\.', country_holiday_def_file) + country_code = country_code_re.group('cc') + cache_file = '{}{}.yaml'.format( + country_code, + '_' + state if type(state) == str else '', + ) + nominatim_file = os.path.join('nominatim_cache', cache_file) + + if not os.path.exists(nominatim_file): + LOG.info('Writing file {}'.format(nominatim_file)) + nominatim_data = json.loads(requests.get(nominatim_url).text) + nominatim_data = OrderedDict(sorted( + nominatim_data.items(), + key=lambda k: NOMINATIM_SORTING.get(k[0], k[0]))) + + with open(nominatim_file, 'w') as nominatim_fh: + if level == 'country': + nominatim_data = yaml.load( + dump_holidays_as_yaml(nominatim_data, add_vspacing=False), + Loader=yaml.RoundTripLoader, + ) + nominatim_old_address = deepcopy(nominatim_data['address']) + nominatim_data['address'] = OrderedDict() + address_attrs_commented_out = [] + for address_attr in sorted(nominatim_old_address.keys()): + if address_attr in KEEP_STATE_LEVEL_ADDRESS_ATTRS: + nominatim_data['address'][address_attr] = nominatim_old_address[address_attr] + else: + address_attrs_commented_out.append('{}: {}'.format( + address_attr, + nominatim_old_address[address_attr], + )) + nominatim_data.yaml_set_comment_before_after_key( + 'boundingbox', + before='\n'.join(address_attrs_commented_out), + indent=2, + ) + + nominatim_data['address'] = OrderedDict(sorted(nominatim_data['address'].items())) + nominatim_yaml = dump_holidays_as_yaml(nominatim_data, add_vspacing=False) + LOG.debug(nominatim_yaml) + nominatim_fh.write(nominatim_yaml) + + +def get_args_parser(): + args_parser = argparse.ArgumentParser( + description=__doc__, + # epilog=__doc__, + ) + args_parser.add_argument( + '-V', '--version', + action='version', + version=__version__, + ) + args_parser.add_argument( + '-d', '--debug', + help="Write debugging and higher to STDOUT|STDERR.", + action="store_const", + dest="loglevel", + const=logging.DEBUG, + ) + args_parser.add_argument( + '-v', '--verbose', + help="Write information and higher to STDOUT|STDERR.", + action="store_const", + dest="loglevel", + const=logging.INFO, + ) + args_parser.add_argument( + '-q', '--quiet', '--silent', + help="Only write errors and higher to STDOUT|STDERR.", + action="store_const", + dest="loglevel", + const=logging.ERROR, + ) + args_parser.add_argument( + '-n', '--no-cache', + help="Do not cache intermediary files.", + action="store_false", + dest="cache", + ) + args_parser.add_argument( + '-c', '--cache-dir', + help="Cache directory, defaults to the default cache directory of your operating system.", + ) + args_parser.add_argument( + '-i', '--input-file', + help="File path to the input file to process." + " '-' will read from STDIN.", + ) + + return args_parser + + +def main(): # pylint: disable=too-many-branches + args_parser = get_args_parser() + args = args_parser.parse_args() + if args.loglevel is None: + args.loglevel = logging.WARNING + logging.basicConfig( + format='%(levelname)s{}: %(message)s'.format( + ' (%(filename)s:%(lineno)s)' if args.loglevel <= logging.DEBUG else '', + ), + level=args.loglevel, + ) + + if args.cache: + import requests_cache + requests_cache.install_cache('requests_cache') + + for country_holiday_def_file in iglob('*.yaml'): + c_def = yaml.safe_load(open(country_holiday_def_file, 'r', encoding='utf-8')) + if type(c_def.get('_nominatim_url')) == str: + handle_nominatim_url(c_def['_nominatim_url'], country_holiday_def_file) + for r_name, r_def in c_def.items(): + if type(r_def) == dict and type(r_def.get('_nominatim_url')) == str: + handle_nominatim_url( + r_def['_nominatim_url'], + country_holiday_def_file, + state=r_def.get('_state_code', r_name), + ) + +if __name__ == '__main__': + main() diff --git a/holidays/ro.yaml b/holidays/ro.yaml index 146c7684..c650c24a 100644 --- a/holidays/ro.yaml +++ b/holidays/ro.yaml @@ -1,5 +1,7 @@ --- +_nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=45.9852129&lon=24.6859225&zoom=18&addressdetails=1&accept-language=ro,en' + # https://ro.wikipedia.org/wiki/S%C4%83rb%C4%83tori_publice_%C3%AEn_Rom%C3%A2nia#Zile_oficiale_de_s.C4.83rb.C4.83toare_.C3.AEn_care_nu_se_lucreaz.C4.83 PH: 'Anul Nou': [1, 1] diff --git a/holidays/ru.yaml b/holidays/ru.yaml index c44cef8e..68054204 100644 --- a/holidays/ru.yaml +++ b/holidays/ru.yaml @@ -15,7 +15,9 @@ PH: # https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%B0%D0%B7%D0%B4%D0%BD%D0%B8% 'Праздник Весны и Труда': [5, 1] 'День народного единства': [11, 4] 'День России': [6, 12] -Tatarstan: +Татарстан: + _state_code: tatarstan + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=55.7780&lon=49.1303&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -36,7 +38,9 @@ Tatarstan: 'День Республики Татарстан': [8, 30] 'Курбан-байрам': [10, 4] 'День Конституции Республики Татарстан': [11, 6] -Bashkortostan: +Башкортостан: + _state_code: bashkortostan + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=54.1264&lon=56.5797&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -57,7 +61,9 @@ Bashkortostan: 'Курбан-байрам': [10, 4] 'День Республики Башкирии': [10, 11] 'День Конституции Башкортостана': [12, 24] -Chuvashia: +Чувашия: + _state_code: chuvashia + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=55.4871&lon=47.1659&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -75,7 +81,9 @@ Chuvashia: 'День России': [6, 12] # local 'День Чувашской республики': [6, 24] -'Sakha Republic': +'Республика Саха (Якутия)': + _state_code: sakha + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=62.1010&lon=129.7176&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -95,7 +103,9 @@ Chuvashia: # local 'Ысыах': [6, 23] 'День государственности Республики Саха': [9, 27] -'Republic of Kalmykia': +'Калмыкия': + _state_code: kalmykia + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=46.524&lon=44.731&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -117,7 +127,9 @@ Chuvashia: 'День рождения Будды Шакьямун': [6, 6] 'Зул': [12, 15] 'День памяти жертв депортации калмыцкого народа': [12, 28] -Buryatia: +'Республика Бурятия': + _state_code: buryatia + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=52.014&lon=109.366&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -135,7 +147,9 @@ Buryatia: 'День России': [6, 12] # local 'Сагаалган': [1, 14] -'Republic of Karelia': +'Республика Карелия': + _state_code: karelia + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=63.832&lon=33.626&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -154,7 +168,9 @@ Buryatia: # local 'День Республики Карелия': [6, 8] 'День освобождения Карелии от фашистских захватчиков': [9, 30] -'Удмуртская республика': +'Приволжский федеральный округ': + _state_code: udmurtia + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=56.8642&lon=53.2054&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -172,7 +188,9 @@ Buryatia: 'День России': [6, 12] # local 'День Государственности Удмуртской Республики': [5, 31] -Adygea: +'Адыгея': + _state_code: adygea + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=44.60627&lon=40.10432&zoom=18&addressdetails=1&accept-language=ru,us' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -192,7 +210,9 @@ Adygea: 'Ураза-байрам': [7, 28] 'Курбан-байрам': [10, 4] 'День образования Республики Адыгея': [10, 5] -'Republic of Dagestan': +'Дагестан': + _state_code: dagestan + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=43.118&lon=46.959&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -213,7 +233,9 @@ Adygea: 'Ураза-байрам': [7, 28] 'День единства народов Дагестана': [9, 15] 'Курбан-байрам': [10, 4] -Ingushetia: +Ингушетия: + _state_code: ingushetia + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=43.1171&lon=44.8626&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -233,7 +255,9 @@ Ingushetia: 'День образования Республики Ингушетия': [6, 4] 'Ураза-байрам': [7, 28] 'Курбан-байрам': [10, 4] -'Карачаево-Черкесская республика': +'Карачаево-Черкесия': + _state_code: karachay_cherkess + _nominatim_url: https://nominatim.openstreetmap.org/reverse?format=json&lat=43.7916&lon=41.7268&zoom=18&addressdetails=1&accept-language=ru,en PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -253,7 +277,9 @@ Ingushetia: 'День возрождения карачаевского народа': [5, 3] 'Ураза-байрам': [7, 28] 'Курбан-байрам': [10, 4] -'Chechen Republic': +Чечня: + _state_code: chechnya + _nominatim_url: https://nominatim.openstreetmap.org/reverse?format=json&lat=43.451&lon=45.700&zoom=18&addressdetails=1&accept-language=ru,en PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -273,7 +299,9 @@ Ingushetia: 'День мира в Чеченской Республике': [4, 16] 'Ураза-байрам': [7, 28] 'Курбан-байрам': [10, 4] -'Кабардино-Балкарская республика': +'Кабардино-Балкария': + _state_code: kabardino_balkaria + _nominatim_url: https://nominatim.openstreetmap.org/reverse?format=json&lat=43.497&lon=43.423&zoom=18&addressdetails=1&accept-language=ru,en PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -295,7 +323,9 @@ Ingushetia: 'Ураза-байрам': [7, 28] 'День государственности Кабардино-Балкарской Республики': [9, 1] 'Курбан-байрам': [10, 4] -'Altai Republic': +'Республика Алтай': + _state_code: altai + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=50.900&lon=86.899&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -313,7 +343,9 @@ Ingushetia: 'День России': [6, 12] # local 'Чага-Байрам': [1, 14] -Tuva: +'Республика Тыва': + _state_code: tuva + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=51.781&lon=94.033&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -332,7 +364,9 @@ Tuva: # local 'Народный праздник Шагаа': [1, 14] 'День Республики Тыва': [8, 15] -'Saratov Oblast': +'Саратовская область': + _state_code: saratov + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=51.335&lon=46.668&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -350,7 +384,9 @@ Tuva: 'День России': [6, 12] # local 'Радоница': [4, 29] -'Bryansk Oblast': +'Брянская область': + _state_code: bryansk + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=52.952&lon=33.283&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] @@ -369,7 +405,9 @@ Tuva: # local 'Радоница': [4, 29] 'День освобождения города Брянска': [9, 17] -'Komi Republic': +'Республика Коми': + _state_code: komi + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=64.191&lon=55.826&zoom=18&addressdetails=1&accept-language=ru,en' PH: '1. Новогодние каникулы': [1, 1] '2. Новогодние каникулы': [1, 2] diff --git a/holidays/se.yaml b/holidays/se.yaml index c901f679..e8586cf3 100644 --- a/holidays/se.yaml +++ b/holidays/se.yaml @@ -1,5 +1,7 @@ --- +_nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=63.1151&lon=16.5767&zoom=18&addressdetails=1&accept-language=sv,en' + # http://www.riksdagen.se/sv/dokument-lagar/dokument/svensk-forfattningssamling/lag-1989253-om-allmanna-helgdagar_sfs-1989-253 # https://en.wikipedia.org/wiki/Public_holidays_in_Sweden PH: diff --git a/holidays/sk.yaml b/holidays/sk.yaml index fc7411ec..4d299579 100644 --- a/holidays/sk.yaml +++ b/holidays/sk.yaml @@ -1,5 +1,7 @@ --- +_nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=48.7411522&lon=19.4528646&zoom=18&addressdetails=1&accept-language=sk,en' + # https://sk.wikipedia.org/wiki/Zoznam_sviatkov_na_Slovensku or english: https://en.wikipedia.org/wiki/Public_holidays_in_Slovakia PH: 'Deň vzniku Slovenskej republiky': [1, 1] diff --git a/holidays/us.yaml b/holidays/us.yaml index 9a7435c8..665ed900 100644 --- a/holidays/us.yaml +++ b/holidays/us.yaml @@ -9,6 +9,8 @@ PH: # https://en.wikipedia.org/wiki/Public_holidays_in_the_United_States 'Thanksgiving': [firstNovemberThursday, 21] 'Christmas Day': [12, 25] Alabama: + _state_code: al + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=32.3673&lon=-86.2983&zoom=18&addressdetails=1&accept-language=en' PH: # http://www.archives.alabama.gov/intro/holidays.html 'New Year''s Day': [1, 1] 'Robert E. Lee/Martin Luther King Birthday': [firstJanuaryMonday, 14] @@ -23,6 +25,8 @@ Alabama: 'Confederate Memorial Day': [firstAprilMonday, 21] 'Jefferson Davis'' Birthday': [firstJuneMonday, 0] Alaska: + _state_code: ak + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=64.5082&lon=-165.4066&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -36,6 +40,8 @@ Alaska: 'Seward''s Day': [lastMarchMonday, 0] 'Alaska Day': [10, 18] Arizona: + _state_code: az + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=34.9378&lon=-109.7565&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Dr. Martin Luther King Jr./Civil Rights Day': [firstJanuaryMonday, 14] @@ -48,6 +54,8 @@ Arizona: 'Thanksgiving': [firstNovemberThursday, 21] 'Christmas Day': [12, 25] Arkansas: + _state_code: ar + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=34.74610&lon=-92.29054&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Dr. Martin Luther King Jr. and Robert E. Lee''s Birthdays': [firstJanuaryMonday, 14] @@ -61,6 +69,8 @@ Arkansas: 'Christmas Eve': [12, 24] 'Christmas Day': [12, 25] California: + _state_code: ca + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=40.8001&lon=-124.1698&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -74,6 +84,8 @@ California: 'Christmas Day': [12, 25] 'César Chávez Day': [3, 31] Colorado: + _state_code: co + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=39.1804&lon=-106.8218&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -86,6 +98,8 @@ Colorado: 'Thanksgiving': [firstNovemberThursday, 21] 'Christmas Day': [12, 25] Connecticut: + _state_code: ct + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=41.9111&lon=-72.16014&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -100,6 +114,8 @@ Connecticut: 'Lincoln''s Birthday': [2, 12] 'Good Friday': [easter, -2] Delaware: + _state_code: de + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=38.7113&lon=-75.0978&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -114,6 +130,8 @@ Delaware: 'Christmas Day': [12, 25] 'Good Friday': [easter, -2] 'District of Columbia': + _state_code: dc + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=38.8953&lon=-77.0356&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -127,6 +145,8 @@ Delaware: 'Christmas Day': [12, 25] 'Emancipation Day': [4, 16] Florida: + _state_code: fl + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=25.7720&lon=-80.1324&zoom=18&addressdetails=1&accept-language=en' PH: # http://www.leg.state.fl.us/Statutes/index.cfm?App_mode=Display_Statute&Search_String=&URL=0100-0199/0110/Sections/0110.117.html 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -138,6 +158,8 @@ Florida: 'Friday after Thanksgiving': [firstNovemberThursday, 22] 'Christmas Day': [12, 25] Georgia: + _state_code: ga + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=31.0823&lon=-81.4192&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -152,6 +174,8 @@ Georgia: 'Christmas Day': [12, 25] 'Confederate Memorial Day': [lastAprilMonday, 0] Guam: + _state_code: gu + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=13.4311&lon=144.6549&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -169,6 +193,8 @@ Guam: 'Lady of Camarin Day': [12, 8] 'Christmas Day': [12, 25] Hawaii: + _state_code: hi + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=19.6423&lon=-155.4837&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -184,6 +210,8 @@ Hawaii: 'Statehood Day': [firstAugustFriday, 14] 'Election Day': [firstNovemberMonday, 1] Idaho: + _state_code: id + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=47.6710&lon=-116.7671&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr.-Idaho Human Rights Day': [firstJanuaryMonday, 14] @@ -196,6 +224,8 @@ Idaho: 'Thanksgiving': [firstNovemberThursday, 21] 'Christmas Day': [12, 25] Illinois: + _state_code: il + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=42.05202&lon=-87.67594&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -211,6 +241,8 @@ Illinois: 'Casimir Pulaski Day': [firstMarchMonday, 0] 'Election Day': [firstNovemberMonday, 1] Indiana: + _state_code: in + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=40.4179&lon=-86.8969&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -227,6 +259,8 @@ Indiana: 'Primary Election Day': [firstMayMonday, 1] 'Election Day': [firstNovemberMonday, 1] Iowa: + _state_code: ia + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=41.9747&lon=-91.6760&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -240,6 +274,8 @@ Iowa: 'Christmas Day': [12, 25] 'Lincoln''s Birthday': [2, 12] Kansas: + _state_code: ks + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=37.6888&lon=-97.3271&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -252,6 +288,8 @@ Kansas: 'Thanksgiving': [firstNovemberThursday, 21] 'Christmas Day': [12, 25] Kentucky: + _state_code: ky + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=36.8446&lon=-83.3196&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -267,6 +305,8 @@ Kentucky: 'New Year''s Eve': [12, 31] 'Good Friday': [easter, -2] Louisiana: + _state_code: la + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=30.1800&lon=-90.1787&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -282,6 +322,8 @@ Louisiana: 'Good Friday': [easter, -2] 'Election Day': [firstNovemberMonday, 1] Maine: + _state_code: me + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=44.7903&lon=-68.7829&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -295,6 +337,8 @@ Maine: 'Christmas Day': [12, 25] 'Patriots'' Day': [firstAprilMonday, 14] Maryland: + _state_code: md + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=38.3206&lon=-75.6213&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -308,6 +352,8 @@ Maryland: 'Native American Heritage Day': [firstNovemberThursday, 22] 'Christmas Day': [12, 25] Massachusetts: + _state_code: ma + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=42.3550&lon=-71.0645&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -321,6 +367,8 @@ Massachusetts: 'Christmas Day': [12, 25] 'Patriots'' Day': [firstAprilMonday, 14] Michigan: + _state_code: mi + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=42.7153&lon=-84.4995&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -335,6 +383,8 @@ Michigan: 'Christmas Day': [12, 25] 'New Year''s Eve': [12, 31] Minnesota: + _state_code: mn + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=47.8278&lon=-90.0484&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -347,6 +397,8 @@ Minnesota: 'Thanksgiving': [firstNovemberThursday, 21] 'Christmas Day': [12, 25] Mississippi: + _state_code: ms + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=30.3986&lon=-88.8820&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King''s and Robert E. Lee''s Birthdays': [firstJanuaryMonday, 14] @@ -360,6 +412,8 @@ Mississippi: 'Christmas Day': [12, 25] 'Confederate Memorial Day': [lastAprilMonday, 0] Missouri: + _state_code: mo + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=37.0799&lon=-94.5060&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -373,6 +427,8 @@ Missouri: 'Christmas Day': [12, 25] 'Truman Day': [5, 8] Montana: + _state_code: mt + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=48.3866&lon=-115.5498&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -388,6 +444,8 @@ Montana: 'Christmas Eve': [12, 24] 'New Year''s Eve': [12, 31] Nebraska: + _state_code: ne + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=41.2587&lon=-95.9374&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -401,6 +459,8 @@ Nebraska: 'Christmas Day': [12, 25] 'Arbor Day': [lastAprilFriday, 0] Nevada: + _state_code: nv + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=36.1215&lon=-115.1704&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -414,6 +474,8 @@ Nevada: 'Nevada Day': [lastOctoberFriday, 0] 'Family Day': [firstNovemberThursday, 22] 'New Hampshire': + _state_code: nh + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=43.5628&lon=-71.9447&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Civil Rights Day': [firstJanuaryMonday, 14] @@ -428,6 +490,8 @@ Nevada: 'Christmas Day': [12, 25] 'Election Day': [firstNovemberMonday, 1] 'New Jersey': + _state_code: nj + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=39.9475&lon=-75.1066&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -443,6 +507,8 @@ Nevada: 'Good Friday': [easter, -2] 'Election Day': [firstNovemberMonday, 1] 'New Mexico': + _state_code: nm + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=34.0790&lon=-107.6179&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -455,6 +521,8 @@ Nevada: 'Day after Thanksgiving': [firstNovemberThursday, 22] 'Christmas Day': [12, 25] 'New York': + _state_code: ny + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=42.8126&lon=-73.9379&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -469,6 +537,8 @@ Nevada: 'Lincoln''s Birthday': [2, 12] 'Election Day': [firstNovemberMonday, 1] 'North Carolina': + _state_code: nc + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=35.7802&lon=-78.6394&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -485,6 +555,8 @@ Nevada: 'Day after Christmas': [12, 26] 'Good Friday': [easter, -2] 'North Dakota': + _state_code: nd + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=48.1459&lon=-103.6232&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -497,6 +569,8 @@ Nevada: 'Thanksgiving': [firstNovemberThursday, 21] 'Christmas Day': [12, 25] Ohio: + _state_code: oh + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=41.4846&lon=-82.6852&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -509,6 +583,8 @@ Ohio: 'Thanksgiving': [firstNovemberThursday, 21] 'Christmas Day': [12, 25] Oklahoma: + _state_code: ok + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=36.0514&lon=-95.7892&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -522,6 +598,8 @@ Oklahoma: 'Day after Thanksgiving': [firstNovemberThursday, 22] 'Christmas Day': [12, 25] Oregon: + _state_code: or + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=45.3732&lon=-121.6959&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -534,6 +612,8 @@ Oregon: 'Thanksgiving': [firstNovemberThursday, 21] 'Christmas Day': [12, 25] Pennsylvania: + _state_code: pa + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=40.3340&lon=-75.9300&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -547,6 +627,8 @@ Pennsylvania: 'Christmas Day': [12, 25] 'Flag Day': [6, 14] 'Puerto Rico': + _state_code: pr + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=18.4364&lon=-66.1188&zoom=18&addressdetails=1&accept-language=en' PH: 'Día de Año Nuevo': [1, 1] 'Día de Reyes': [1, 6] @@ -568,6 +650,8 @@ Pennsylvania: 'Noche Buena': [12, 24] 'Día de Navidad': [12, 25] 'Rhode Island': + _state_code: ri + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=41.8251&lon=-71.4194&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -581,6 +665,8 @@ Pennsylvania: 'Christmas Day': [12, 25] 'Victory Day': [firstAugustMonday, 7] 'South Carolina': + _state_code: sc + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=32.7878&lon=-79.9392&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -594,6 +680,8 @@ Pennsylvania: 'Christmas Day': [12, 25] 'Confederate Memorial Day': [5, 10] 'South Dakota': + _state_code: sd + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=43.7148&lon=-98.0249&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -606,6 +694,8 @@ Pennsylvania: 'Thanksgiving': [firstNovemberThursday, 21] 'Christmas Day': [12, 25] Tennessee: + _state_code: tn + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=35.1438&lon=-90.0231&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -620,6 +710,8 @@ Tennessee: 'Christmas Day': [12, 25] 'Good Friday': [easter, -2] Texas: + _state_code: tx + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=30.2655&lon=-97.7559&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -635,6 +727,8 @@ Texas: 'Christmas Day': [12, 25] 'Day after Christmas': [12, 26] 'United States Virgin Islands': + _state_code: vi + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=18.3433&lon=-64.9347&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -658,6 +752,8 @@ Texas: 'Christmas Second Day': [12, 26] 'New Year''s Eve': [12, 31] Utah: + _state_code: ut + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=40.5888&lon=-111.6378&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -671,6 +767,8 @@ Utah: 'Christmas Day': [12, 25] 'Pioneer Day': [7, 24] Vermont: + _state_code: vt + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=44.2597&lon=-72.5800&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -685,6 +783,8 @@ Vermont: 'Town Meeting Day': [firstMarchTuesday, 0] 'Battle of Bennington': [firstAugustMonday, 14] Virginia: + _state_code: va + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=36.9454&lon=-76.2888&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Lee-Jackson Day': [firstJanuaryMonday, 11] @@ -698,6 +798,8 @@ Virginia: 'Thanksgiving': [firstNovemberThursday, 21] 'Christmas Day': [12, 25] Washington: + _state_code: wa + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=46.8598&lon=-121.7256&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -710,6 +812,8 @@ Washington: 'Thanksgiving': [firstNovemberThursday, 21] 'Christmas Day': [12, 25] 'West Virginia': + _state_code: wv + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=38.3686&lon=-81.6070&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -724,6 +828,8 @@ Washington: 'West Virginia Day': [6, 20] 'Lincoln''s Day': [firstNovemberThursday, 22] Wisconsin: + _state_code: wi + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=45.8719&lon=-89.6930&zoom=18&addressdetails=1&accept-language=en' PH: # http://docs.legis.wisconsin.gov/statutes/statutes/995/20 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] @@ -738,6 +844,8 @@ Wisconsin: 'Primary Election Day': [firstAugustTuesday, 7] 'Election Day': [firstNovemberMonday, 1] Wyoming: + _state_code: wy + _nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=42.8590&lon=-106.3126&zoom=18&addressdetails=1&accept-language=en' PH: 'New Year''s Day': [1, 1] 'Martin Luther King, Jr. Day': [firstJanuaryMonday, 14] diff --git a/index.js b/index.js index c53e8c79..b4f99158 100644 --- a/index.js +++ b/index.js @@ -85,7 +85,7 @@ // var msec_in_week = msec_in_day * 7; var library_name = 'opening_hours.js'; - var repository_url = 'https://github.com/ypid/' + library_name; + var repository_url = 'https://github.com/opening-hours/' + library_name; // var issues_url = repository_url + '/issues?state=open'; /* }}} */ @@ -2386,7 +2386,6 @@ throw formatLibraryBugMessage(t('no SH definition', { 'name': SH_hash.name, 'year': year, - 'repository_url': repository_url, }), 'library bug PR only'); } else { return undefined; diff --git a/js/i18n-resources.js b/js/i18n-resources.js deleted file mode 100644 index 15d514af..00000000 --- a/js/i18n-resources.js +++ /dev/null @@ -1,1033 +0,0 @@ -// localization {{{ -var resources = { // English is fallback language. - // English (en) localization {{{ - en: { - translation: { - "lang": { - "en": "English", - "fr": "French", - "de": "German", - "ru": "Russian", - "pt": "Portuguese", - "it": "Italian", - "uk": "Ukrainian", - "nl": "Dutch language", - "choose": "Choose Language", - }, - - "weekdays": { - "word next": { // The Russian language seems to use other words for next for some weekdays. - "su": "next", - "mo": "next", - "tu": "next", - "we": "next", - "th": "next", - "fr": "next", - "sa": "next", - } - }, - "texts": { - "filter": { - "none": "Do not apply any filters", - "error": "Error and warning messages", - "warnOnly": "Warnings only", - "errorOnly": "Error only", - "open": "Only facilities which are open now", - "unknown": "Only facilities which might be open now", - "closed": "Only facilities which are closed now", - "openOrUnknown": "Only facilities which are open or unknown now", - }, - "title": "opening_hours evaluation tool", - "open always": "Facility is always open", - "unknown always": "Facility is always maybe open", - "closed always": "Facility is always closed in the (near) future", - "open now": "Facility is now open", - "unknown now": "Facility might be open now", - "closed now": "Facility is now closed", - "will close": "but will close __timestring____comment__.", - "will unknown": "but will maybe open __timestring____comment__.", - "will open": "but will open __timestring____comment__.", - "depends on": ", but that depends on __comment__.", - "week stable": "Schedule is valid in any given week.", - "not week stable": "Attention! This schedule might change for other weeks.", - "value for": "value for", - "value to compare": "value to compare to the first value", - "MatchingRule": "Applied rule", - "prettified value": 'prettified opening_hours value (this value can be safely used in OSM, after all warnings have been solved)', - "prettified value for displaying": "prettified opening_hours value for displaying (including newlines, do not use this as value for OSM)", - "more information": "For more information you can check out the OSM wiki.", - "this website": "This website and the JavaScript library used for the evaluation of opening hours are developed on __hoster__.", - "if PH is between Mo and Fr": "Only if the public holiday is a weekday (Mo-Fr)", - "check out error correction, prettify": "check out the error correction and the prettify function for the opening_hours value", - "SH,PH or PH,SH": "This makes a small difference compared to the previous value. The name of the school holidays will override the PH names in the comment.", - "config POIs": "configure POIs", - "reload map": "reload map", - "heading map": "Map with layer for the tag opening_hours based on OpenStreetMap", - "map is showing": 'This map is showing objects with the tag opening_hours as colored circles:', - "error": "The value could not be parsed", - "warning": "If there appeared warnings during evaluation, a blue __sign__ will show up in the status icon.", - "map filter": "There are a few filters which can be applied to find and fix mistakes (QA) or to just display open or closed facilities:", - "data source": 'The overlay data comes from __OSMStartaTag__ and is queried using the __APIaTag__. The map is __OSMaTag__.', - "mode 0": 'Only time ranges are accepted (tags opening_hours, lit)', - "mode 1": 'Only points in time are accepted', - "mode 2": 'Time ranges and points in time are accepted (tags service_times, collection_times)', - "value to long for osm": 'The value is too long for OSM. The OpenStreetMap database is currently limited to values with up to __maxLength__ characters. The prettified value has a length of __pretLength__ and the value you entered is __valLength__ characters long', - "low zoom level": 'The POIs will start to appear at zoom level ${next} and above. You are currently on zoom level ${actual}.', - "all n entries": 'All __total__ entries:', - "the first entries": 'The first __number__ of __total__ entries:', - "load all with JOSM": 'load all in JOSM', - "evaluation tool": 'evaluation tool', - "rule separator ;": 'rule separator (the next rule will be a normal rule)', - "rule separator ||": 'rule separator (the next rule will be a fallback rule which applies for any time not handled by previous rules)', - "rule separator ,": 'rule separator (the next rule will be a additional rule which extends the times of previous rules and does not override them like normal rules would do)', - "JOSM remote conn error": 'Could not connect to JOSM. Please make sure that JOSM is running and is configured for remote control on the default tcp port 8111.', - "refer to yohours": 'This value can also be parsed by YoHours which is a simple editor for the opening_hours syntax. If you don’t need advanced features of the syntax, give it a try.', - }, - "words": { - "modifier": "__name__ modifier", - "selector": "__name__ selector", - "mode": "evaluation mode", - "green": "green", - "yellow": "yellow", - "red": "red", - "violet": "violet", - "to": "to", - "and": "and", - "no": "no", - "undefined": "undefined", - "his": "his", - "docu": "documentation", - "of course": "of course", - "open": "open", - "unknown": "unknown", - "closed": "closed", - "comment": "comment", - "today": "today", - "tomorrow": "tomorrow", - // "on weekday": "on", // not needed in this context - "on weekday": " ", - "in duration": "in", - "region": "region", - "position": "position", - "lat": "latitude", - "lon": "longitude", - "country": "country", - "state": "state", - "status": "status", - "examples": "Examples", - "none": "none", - "date": "date", - "time": { // __count__ Can not cover need for Russian language (one, several, many). - "minute": "minute", - "minute_plural": "minutes", - "minute many": "minutes", - "hour": "hour", - "hour_plural": "hours", - "hour many": "hours", - "day": "day", - "day_plural": "days", - "day many": "days", - "year": "year", - "year_plural": "years", - "years many": "years", - "hours minutes sep": "and ", - "now": "now", - "time": "time", - }, - }, - }, - }, // }}} - - // Dutch (nl) localization {{{ - nl: { - translation: { - "lang": { - "en": "Engels", - "fr": "Frans", - "de": "Duits", - "ru": "Russisch", - "pt": "Portugees", - "it": "Italiaans", - "uk": "Oekraïens", - "nl": "Nederlands", - "choose": "Kies taal", - }, - - "weekdays": { - "word next": { // The Russian language seems to use other words for next for some weekdays. - "su": "volgende", - "mo": "volgende", - "tu": "volgende", - "we": "volgende", - "th": "volgende", - "fr": "volgende", - "sa": "volgende", - } - }, - "texts": { - "filter": { - "none": "Geen filters toepassen", - "error": "Fouten en waarschuwingen", - "warnOnly": "Enkel waarschuwingen", - "errorOnly": "Enkel foutboodschappen", - "open": "Enkel zaken die nu open zijn", - "unknown": "Enkel zaken die nu mogelijks open zijn", - "closed": "Enkel zaken die nu gesloten zijn", - "openOrUnknown": "Enkel zaken die nu open zijn of die mogelijks open zijn", - }, - "title": "opening_hours Evaluatie Gereedschap", - "open always": "Zaak is altijd open", - "unknown always": "Zaak is waarschijnlijk altijd open", - "closed always": "Zaak is altijd gesloten in de (nabije) toekomst", - "open now": "Zaak is nu open", - "unknown now": "Zaak zou nu open kunnen zijn", - "closed now": "Zaak is nu gesloten", - "will close": "maar zal sluiten op __timestring____comment__.", - "will unknown": "maar zal misschien open zjn op __timestring____comment__.", - "will open": "maar zal openen op __timestring____comment__.", - "depends on": ", maar hangt af van __comment__.", - "week stable": "Openingsuren zijn altijd geldig.", - "not week stable": "Opegelet! Openingsuren kunnen wijzigen afhankelijk van de gekozen week.", - "value for": "waarde voor", - "value to compare": "waarde om te vergelijken met de eerste waarde", - "MatchingRule": "Toegepaste regel", - "prettified value": 'Mooi gemaakte opening_hours waarde (deze waarde kan zonder problemen in OSM gebruikt worden, nadat alle waarschuwingen zijn weggewerkt)', - "prettified value for displaying": "Mooi gemaakte opening_hours waarde om op het scherm te tonen (bevat verschillende lijnen, gebruik dit niet als waarde voor OSM)", - "more information": "Voor meer informatie, raadpleef de OSM wiki.", - "this website": "Deze website en de JavaScript library die gebruikt wordt voor de evaluatie zijn ontwikkeld op __hoster__.", - "if PH is between Mo and Fr": "Enkel als de feestdag op een weekdag valt (Ma-Vr)", - "check out error correction, prettify": "controleer de fout correctie en de mooi maak functie voor de opening_hours waarde", - "SH,PH or PH,SH": "Dit maakt een klein verschil met de vorige waarde. De naam van de vrije schooldagen zal de namen van de feestdagen in de commentaar overschrijven.", - "config POIs": "configureer POIs", - "reload map": "herlaad kaart", - "heading map": "Kaart met laag voor de opening_hours tag op on OpenStreetMap", - "map is showing": 'Deze kaart toont de object met tag opening_hours als gekleurde cirkels:', - "error": "De waarde kon niet ontleed worden", - "warning": "Indien er waarschuwingen getoond werden tijden de evaluatie, zal een blauw __sign__ getoond worden in het status icoon.", - "map filter": "Er zijn een aantal filters die kunnen toegepast worden om fouten te vinden en te verbeteren (QA) of gewoon om gesloten of open zaken te tonen:", - "data source": 'De overlay gegevens komen van __OSMStartaTag__ en is bevraagd met __APIaTag__. De kaart is __OSMaTag__.', - "mode 0": 'Alleen tijdsperioden zijn toegestaan (zoals bij de tags opening_hours, lit)', - "mode 1": 'Individuele tijdspunten zijn toegestaan', - "mode 2": 'Zowel tijdsperioden als individuele tijdspunten zijn toegestaan (zoals bij de tags service_times, collection_times)', - "value to long for osm": 'De waarde is te lang voor OSM. De OpenStreetMap databank is momenteel beperkt tot waardes met __maxLength__ karakter. De mooi gemaakte waarde heeft een lengte van __pretLength__ en de ingevoerde waarde is __valLength__ karakters lang', - "low zoom level": 'De POIs verschijnen vanaf zoomniveau ${next}. U bent momenteel op zoomniveau ${actual}.', - "all n entries": 'Alle resultaten (__total__):', - "the first entries": 'De eerste __number__ van __total__ resultaten:', - "load all with JOSM": 'laad alles in JOSM', - "evaluation tool": 'evaluatie gereedschap', - "rule separator ;": 'scheidingsteken voor regel (de volgende regel zal een normale regel zijn)', - "rule separator ||": 'scheidingsteken voor regel (de volgende regel will be a fallback rule which applies for any time not handled by previous rules)', - "rule separator ,": 'scheidingsteken voor regel (de volgende regel is aanvullende regel die de tijden van de vorige regels uitbreid. De volgende regel overschrijft de vorige regels dus niet (zoals een normale regel wel doet)', - "JOSM remote conn error": 'Kan niet connecteren met JOSM. Controleer aub dat JOSM is opgestart en geconfigureerd is voor afstandbediening via de standaard tcp port 8111.', - "refer to yohours": 'Deze waarde kan ook geïnterpreteerd worden door YoHours. Dit is een eenvoudige editor voor de opening_hours syntax. Indien je de geavanceerde mogelijkheden van de syntax niet nodig hebt, probeer YoHours dan eens.', - }, - "words": { - "modifier": "__name__ wijziger (modifier)", - "selector": "__name__ keuzeschakelaar (selector)", - "mode": "evaluatie modus", - "green": "groen", - "yellow": "geel", - "red": "rood", - "violet": "violet", - "to": "tot", - "and": "en", - "no": "nee", - "his": "zijn", - "docu": "documentatie", - "of course": "natuurlijk", - "open": "open", - "unknown": "onbekend", - "closed": "gesloten", - "comment": "commentaar", - "today": "vandaag", - "tomorrow": "morgen", - // "on weekday": "on", // not needed in this context - "on weekday": " ", - "in duration": "in", - "region": "regio", - "position": "positie", - "lat": "latitude", - "lon": "longitude", - "country": "land", - "state": "staat", - "status": "status", - "examples": "Voorbeelden", - "none": "geen", - "date": "datum", - "time": { // __count__ Can not cover need for Russian language (one, several, many). - "minute": "minuut", - "minute_plural": "minuten", - "minute many": "minuten", - "hour": "uur", - "hour_plural": "uren", - "hour many": "uren", - "day": "dag", - "day_plural": "dagen", - "day many": "dagen", - "year": "jaar", - "year_plural": "jaren", - "years many": "jaren", - "hours minutes sep": "en ", - "now": "nu", - "time": "tijd", - }, - }, - }, - }, // }}} - - // French (fr) localization {{{ - fr: { - translation: { - "lang": { - "en": "Anglais", - "fr": "Français", - "de": "Allemand", - "ru": "Russe", - "pt": "Portugais", - "it": "Italien", - "uk": "Ukrainien", - "choose": "Choisissez la langue", - }, - - "weekdays": { - "word next": { // The Russian language seems to use other words for next for some weekdays. - "mo": "prochain", - "tu": "prochain", - "we": "prochain", - "th": "prochain", - "fr": "prochain", - "sa": "prochain", - "su": "prochain", - } - }, - "texts": { - "filter": { - "none": "Do not apply any filters", - "error": "Messages d'erreur et d'avertissement", - "warnOnly": "Seulement les avertissements", - "errorOnly": "Seulement les erreurs", - "open": "Seulement les installations ouvertes en ce moment", - "unknown": "Seulement les installations indéterminées en ce moment", - "closed": "Seulement les installations fermées en ce moment", - "openOrUnknown": "Seulement les installations ouvertes ou indéterminées en ce moment", - }, - "open always": "L'installation est ouverte en permanence", - "unknown always": "L'installation est peut-être ouverte en permanence", - "closed always": "L'installation est fermée en permanence (à court terme)", - "open now": "L'installation est ouverte en ce moment", - "unknown now": "L'installation est indéterminée en ce moment", - "closed now": "L'installation est fermée en ce moment", - "will close": "mais va fermer __timestring____comment__.", - "will unknown": "mais va peut-être ouvrir __timestring____comment__.", - "will open": "mais va ouvrir __timestring____comment__.", - "depends on": ", mais cela dépend de __comment__.", - "week stable": "L'horaire est valable dans n'importe quelle semaine donnée.", - "not week stable": "Attention ! Cet horaire peut changer pour les autres semaines.", - "value for": "valeur pour", - "MatchingRule": "Sous-chaîne utilisée par la règle appliquée", - "prettified value": 'valeur opening_hours embellie (cette valeur peut être utilisée en toute sécurité dans OSM, après que tous les avertissements aient été corrigés)', - "prettified value for displaying": "valeur opening_hours embellie pour l'affichage (inclut des sauts de ligne, ne pas l'utiliser comme valeur pour OSM)", - "more information": "Pour plus d'informations vous pouvez consulter le wiki OSM.", - "this website": "Ce site web et la bibliothèque JavaScript utilisée pour l'évaluation des horaires d'ouverture sont développés sur __hoster__.", - "if PH is between Mo and Fr": "Seulement si le jour férié est un jour de semaine (lundi-vendredi)", - "check out error correction, prettify": "consultez la correction d'erreur et la fonction prettify pour la valeur de opening_hours", - "SH,PH or PH,SH": "Ceci donne un petit écart par rapport à la valeur précédente. Le nom des vacances scolaires remplace les noms des jours fériés dans le commentaire.", - "config POIs": "configurer les POIs", - "reload map": "rafraîchir la carte", - "heading map": "Carte avec calque pour le tag opening_hours basée sur OpenStreetMap", - "map is showing": 'cette carte affiche les nœuds portant le tag opening_hours comme des cercles colorés :', - "error": "La valeur n'a pas pu être analysée", - "warning": "S'il y a eu des avertissements lors de l'évaluation, un __sign__ bleu s'affichera dans l'icône d'état.", - "map filter": "Il ya quelques filtres qui peuvent être appliqués pour trouver et corriger les erreurs (AQ) ou pour afficher seulement les installations ouvertes ou fermées:", - "data source": "Les données en superposition viennent de __APIaTag__. La carte est __OSMaTag__.", - "mode 0": "Seuls les intervalles de temps sont acceptés (tags opening_hours, lit)", - "mode 1": "Seuls les points dans le temps sont acceptés", - "mode 2": "Les plages horaires et les points dans le temps sont acceptés (tags service_times, collection_times)", - "value to long for osm": "La valeur est trop longue pour OSM. La base de données OpenStreetMap est actuellement limitée à des valeurs d'un maximum de __maxLength__ caractères. La valeur embellie a une longueur de __pretLength__ et la valeur que vous avez entrée comporte __valLength__ caractères", - "low zoom level": 'Les POIs vont commencer à apparaître au niveau de zoom ${next} et au-delà. Vous êtes actuellement au niveau de zoom ${actual}.', - "all n entries": "Ensemble des __total__ entrées :", - "the first entries": "Les __number__ premières entrées sur __total__ :", - "refer to yohours": "Cette valeur peut également s'afficher dans YoHours, un éditeur simple d'horaires d'ouverture. Si vous n'utilisez pas les fonctionnalités avancées de la syntaxe, vous pouvez l'essayer ici.", - }, - "words": { - "mode": "mode d'évaluation", - "green": "vert", - "yellow": "jaune", - "red": "rouge", - "violet": "violet", - "to": "à", - "and": "et", - "no": "pas de", - "his": "son", - "docu": "documentation", - "of course": "bien sûr", - "open": "ouvert", - "unknown": "indéterminé", - "closed": "fermé", - "comment": "commentaire", - "today": "aujourd'hui", - "tomorrow": "demain", - // "on weekday": "on", // not needed in this context - "on weekday": " ", - "in duration": "dans", - "region": "région", - "position": "emplacement", - "lat": "latitude", - "lon": "longitude", - "country": "pays", - "state": "état", - "status": "statut", - "examples": "Exemples", - "none": "aucun", - "date": "date", - "time": { // __count__ Can not cover need for Russian language (one, several, many). - "minute": "minute", - "minute_plural": "minutes", - "minute many": "minutes", - "hour": "heure", - "hour_plural": "heures", - "hour many": "heures", - "day": "jour", - "day_plural": "jours", - "day many": "jours", - "hours minutes sep": "et ", - "now": "en ce moment", - "time": "heure", - }, - }, - }, - }, // }}} - - // German (de) localization {{{ - de: { - translation: { - "lang": { - "en": "Englisch", - "fr": "Französisch", - "de": "Deutsch", - "ru": "Russisch", - "pt": "Portugiesisch", - "it": "Italienisch", - "uk": "Ukrainisch", - "choose": "Wähle eine Sprache", - }, - - "weekdays": { - "word next": { - "su": "nächsten", - "mo": "nächsten", - "tu": "nächsten", - "we": "nächsten", - "th": "nächsten", - "fr": "nächsten", - "sa": "nächsten", - } - }, - "texts": { - "filter": { - "none": "Keinen Filter anwenden", - "error": "Fehler und Warnungen", - "warnOnly": "Nur Warnungen", - "errorOnly": "Nur Fehler", - "open": "Nur Einrichtungen welche jetzt geöffnet sind", - "unknown": "Nur Einrichtungen die möglicherweise jetzt geöffnet sind", - "closed": "Nur Einrichtungen die jetzt geschlossen sind", - "openOrUnknown": "Nur Einrichtungen die jetzt geöffnet oder unbekannt sind", - }, - "title": "opening_hours Auswertewerkzeug", - "open always": "Die Einrichtung hat immer geöffnet.", - "unknown always": "Die Öffnungszeit der Einrichtung ist immer unbekannt", - "closed always": "Die Einrichtung wird in (naher) Zukunft nicht wieder öffnen.", - "open now": "Die Einrichtung hat jetzt geöffnet", - "unknown now": "Die Einrichtung ist möglicherweise jetzt geöffnet", - "closed now": "Die Einrichtung ist jetzt geschlossen", - "will close": "aber wird __timestring__ schließen__comment__.", - "will unknown": "aber wird eventuell __timestring__ öffnen__comment__.", - "will open": "aber wird __timestring__ öffnen__comment__.", - "depends on": ", abhängig von __comment__.", - "week stable": "Dieser Wochenplan gilt für jede Woche.", - "not week stable": "Achtung! Dieser Wochenplan kann sich in anderen Wochen ändern.", - "value for": "Wert für", - "value to compare": "Wert, der mit dem ersten Wert verglichen werden soll", - "MatchingRule": "Zur Anwendung gekommene Regel", - "prettified value": 'Schön formatierter opening_hours Wert (dieser Wert sollte in OSM verwendet werden, nachdem alle Warnungen beseitigt wurden)', - "prettified value for displaying": "Schön formatierter opening_hours Wert für die Anzeige (mit Zeilenumbrüchen, nicht als Tag für OSM gedacht …)", - "more information": "Für weitere Informationen kannst du dir das OSM-Wiki anschauen.", - "this website": "Die Entwicklung dieser Webseite und der JavaScript-Bibliothek zur Auswertung der Öffnungszeiten findet auf __hoster__ statt.", - "if PH is between Mo and Fr": "Nur wenn der Feiertag auf einen Wochentag (Mo-Fr) fällt", - "check out error correction, prettify": "Probiere die Fehlererkennung und schau dir den korrigierten opening_hours Wert an", - "SH,PH or PH,SH": "Dieser Wert unterscheidet sich insofern zum vorherigen als dass der Name für Schulferien den Namen von Feiertagen im Kommentar überschreibt, wenn sich diese überlagern", - "config POIs": "POIs konfigurieren", - "reload map": "Karte aktualisieren", - "heading map": "Karte zur Auswertung des Tags opening_hours basierend auf OpenStreetMap", - "map is showing": 'Diese Karte zeigt Objekte mit dem Tag opening_hours als farbige Kreise:', - "error": "Die Öffnungszeit konnte nicht ausgewertet werden", - "warning": "Sollte eine Öffnungszeit beim verarbeiten eine Warnung erzeugen, wird im Status Icon ein blaues __sign__ angezeigt.", - "map filter": "Es gibt mehrere Filter um nur die Öffnungszeiten von Interesse anzuzeigen. Die Hauptgründe für die Verwendung eines Filters ist die Qualitätssicherung oder das finden von offenen Geschäften. Es folgt eine Liste der möglichen Filter:", - "data source": 'Die auszuwertenden Daten stammen aus __OSMStartaTag__ und werden über die __APIaTag__ abgefragt. Die Karte ist __OSMaTag__.', - "mode 0": 'Es werden nur Zeiträume akzeptiert (Tags opening_hours, lit)', - "mode 1": 'Es werden nur Zeitpunkte akzeptiert', - "mode 2": 'Zeiträume und Zeitpunkte werden akzeptiert (Tags service_times, collection_times)', - "value to long for osm": 'Der opening_hours Wert ist zu lang für OSM. Die OpenStreetMap Datenbank unterstützt zur Zeit nur Werte mit bis zu __maxLength__ Zeichen. Der schön formatierte Wert ist __pretLength__ Zeichen lang und der eingegebene Wert __valLength__.', - "low zoom level": 'Die Marker werden erst auf Zoom Stufe ${next} geladen. Aktuelle Zoom Stufe ist ${actual}.', - "all n entries": 'Alle __total__ Einträge:', - "the first entries": 'Die ersten __number__ von __total__ Einträgen:', - "load all with JOSM": 'Alle in JOSM laden', - "evaluation tool": 'Ausführlich testen', - "rule separator ;": 'Begrenzungszeichen für Regeln (es folgt eine normale Regel)', - "rule separator ||": 'Begrenzungszeichen für Regeln (es folgt eine Oder-Verknüpfte Regel die nur auf Zeiten zutrifft, die nicht bereits von vorherigen Regeln behandelt werden)', - "rule separator ,": 'Begrenzungszeichen für Regeln (es folgt eine additive Regel deren Zeiten vorherige Regeln erweitern und nicht überschreiben wie bei normalen Regeln)', - "JOSM remote conn error": 'Es konnte keine Verbindung zu JOSM aufgebaut werden. Bitte prüfe, ob JOSM ausgeführt wird und Fernsteuerung auf dem Standard tcp Port 8111 erlaubt ist.', - "refer to yohours": 'Dieser Wert kann auch von YoHours verarbeitet werden. YoHours ist ein benutzerfreundlicher Editor für die opening_hours Syntax. Falls keine fortschrittlichen Funktionen der Syntax benötigt werden ist YoHours eine einsteigerfreundliche Alternative. Ausprobieren.', - }, - "words": { - "modifier": "__name__ Regeleigenschaft", - "selector": "__name__ Bereichsdefinition", - "mode": "Auswerte-Modus", - "green": "Grün", - "yellow": "Gelb", - "red": "Rot", - "violet": "Violett", - "to": "bis", - "and": "und", - "no": "kein", - "undefined": "undefiniert", - "his": "seine", - "docu": "Dokumentation", - "of course": "natürlich", - "open": "geöffnet", - "unknown": "unbekannt", - "closed": "geschlossen", - "comment": "Kommentar", - "today": "heute", - "tomorrow": "morgen", - // "on weekday": "on", // not needed in this context - "on weekday": " ", - "region": "Region", - "position": "Position", - "lat": "Breitengrad", - "lon": "Längengrad", - "country": "Land", - "state": "Bundesstaat", - "status": "Status", - "examples": "Beispiele", - "none": "keine", - "date": "Datum", - "time": { // __count__ Can not cover need for Russian language (one, several, many). - "minute": "Minute", - "minute_plural": "Minuten", - "minute many": "Minuten", - "hour": "Stunde", - "hour_plural": "Stunden", - "hour many": "Stunden", - "day": "Tag", - "day_plural": "Tage", - "day many": "Tage", - "year": "Jahr", - "year_plural": "Jahre", - "years many": "Jahre", - "hours minutes sep": "und ", - "now": "Jetzt", - "time": "Zeit", - }, - }, - }, - }, // }}} - - // Russian (ru) localization {{{ - ru: { - translation: { - "lang": { - "en": "английский", - "fr": "французский", - "de": "немецкий", - "ru": "русский", - "pt": "португальский", - "it": "итальянский", - "uk": "украинский", - "choose": "Выберите язык", - }, - - "weekdays": { - "word next": { - "su": "ближайшее", - "mo": "ближайший", - "tu": "ближайший", - "we": "ближайшую", - "th": "ближайший", - "fr": "ближайшую", - "sa": "ближайшую", - }, - }, - "texts": { - "open always": "Заведение всегда открыто.", - "closed always": "Заведение всегда закрыто.", - "open now": "Сейчас заведение открыто", - "closed now": "Сейчас заведение закрыто", - "will close": "Закроется __timestring____comment__.", - "will open": "Откроется __timestring____comment__.", - "week stable": "Расписание верно для любой недели.", - "not week stable": "ВНИМАНИЕ! Расписание меняется в другие недели.", - "value for": "значение для", - "MatchingRule": "использовать правила", - "warn error": "об ошибках и предупреждения", - }, - "words": { - "green": "зелёный", - "yellow": "жёлтый", - "red": "красный", - "violet": "фиолетовый", - "to": "до", - "and": "и", - "no": "Нет", - "open": "c", - "unknown": "неизвестный", - "closed": "закрыто", - "comment": "комментариев", - "today": "сегодня", - "tomorrow": "завтра", - "on weekday": "в ", // optionally in other languages - "in duration": "через", - "region": "регион", - "position": "положение", - "lat": "широта", - "lon": "долгота", - "country": "страна", - "state": "штат", - "status": "статус", - "examples": "примеры", - "date": "дата", - "none": "никто", - "time": { - "minute": "минуту", - "minute_plural_2": "минуты", - "minute_plural_5": "минут", - "hour": "час", - "hour_plural_2": "часа", - "hour_plural_5": "часов", - "day": "день", - "day_plural_2": "дня", - "day_plural_5": "дней", - "now": "сейчас", - "time": "время", - "hours minutes sep": "и ", - }, - }, - }, - }, // }}} - - // Portuguese (pt) localization {{{ - pt: { - translation: { - "lang": { - "en": "Inglês", - "fr": "Francês", - "de": "Alemão", - "ru": "Russo", - "it": "Italiano", - "pt": "Português", - "uk": "Ucraniano", - "choose": "Escolha a sua linguagem", - }, - - "weekdays": { - "word next": { // palavra "próximo" antes de um dia da semana - "su": "próximo", - "mo": "próxima", - "tu": "próxima", - "we": "próxima", - "th": "próxima", - "fr": "próxima", - "sa": "próximo", - } - }, - "texts": { - "filter": { - "none": "Do not apply any filters", - "error": "Mensagens de erro e avisos", - "warnOnly": "Somente avisos", - "errorOnly": "Somente erros", - "open": "Somente lugares que estão aberto agora", - "unknown": "O lugar pode estar aberto agora", - "closed": "Somente lugares que estão fechados agora", - "openOrUnknown": "Somente lugares que estão aberto agora ou que talvez estejam", - }, - "open always": "O lugar está sempre aberto", - "unknown always": "Talvez o lugar sempre esteja aberto", - "closed always": "O lugar está fechado e não se sabe quando ele vai reabrir", - "open now": "O lugar está aberto agora", - "unknown now": "O lugar pode estar aberto agora", - "closed now": "O lugar está fechado agora", - "will close": "Mas vai fechar __timestring____comment__.", - "will unknown": "Mas talvez abrir __timestring____comment__.", - "will open": "Mas vai abrir __timestring____comment__.", - "depends on": ", Mas isso depende de __comment__.", - "week stable": "O horário é o mesmo toda semana.", - "not week stable": "Atenção! Este horário pode mudar em outras semanas.", - "value for": "Valor para a etiqueta", - "MatchingRule": "\"Substring\" usada pela regra aplicada", //como traduzir? - "prettified value": 'Valor "embelezado" da chave opening_hours (este valor pode ser utilizado no OSM sem problemas depois que todos os avisos tenham sido resolvidos)', - "prettified value for displaying": "Exibição do valor \"embelezado\" da etiqueta \"opening_hours\" (inclui quebras de linha, não use isso como valor no OSM)", - "more information": "Para mais informações, veja a wiki do OSM.", - "this website": "Este sítio e a biblioteca JavaScript usados para a avaliação dos horários de funcionamento são desenvolvidos no __hoster__.", - "if PH is between Mo and Fr": "Somente se o feriado for um dia da semana (Mo-Fr)", - "check out error correction, prettify": "Verificar a correção dos erros e embelezar função para o valor da chave \"opening_hours\"", - "SH,PH or PH,SH": "Isso tem uma pequena diferença comparado com o valor anterior. Aqui os nomes dos feriados escolares vão ter prioridade sobre os nomes de outros tipos de feriados nos comentários.", - "config POIs": "Configurar Pontos de Interesse", - "reload map": "Recarregar mapa", - "heading map": "Mapa com uma camada para a etiqueta \"opening_hours\" baseado no OpenStreetMap", - "map is showing": 'este mapa está mostrando como circulos coloridos os pontos que possuem a etiqueta opening_hours:', - "error": "O valor não pode ser analisado", - "warning": "Se apareceram avisos durante a avaliação, um __sign__ azul vai aparecer na barra de estado", - "map filter": "Alguns filtros podem ser aplicados para encontrar e consertar erros (CQ) ou para mostrar somente lugares abertos ou fechados:", - "data source": 'Os dados da camada vem de __APIaTag__. O mapa é __OSMaTag__.', - "mode 0": 'Somente intervalos de tempo são aceitos (etiquetas \"opening_hours\" e \"lit\")', - "mode 1": 'Somente pontos específicos no tempo são aceitos', - "mode 2": 'Intervalos de tempo e pontos específicos no tempo são aceitos (etiquetas \"service_times\" e \"collection_times\")', - "value to long for osm": 'O valor é longo demais para o OSM. O banco de dados do OpenStreetMap atualmente é limitado a valores de até __maxLength__ caracteres. O valor "embelezado" tem um comprimento de __pretLength__ e o valor que você digitou tem __valLength__ caracteres', - "low zoom level": 'Os Pontos de Interesse vão começar a aparecer em um nível de zoom maior ou igual a ${next}. Agora você está no nível de zoom ${actual}.', - "all n entries": 'Todos os __total__ resultados:', - "the first entries": 'Os primeiros __number__ de __total__ resultados:', - "load all with JOSM": 'Carregar tudo no JOSM', - "evaluation tool": 'Derramenta de avaliação', - }, - "words": { - "mode": "Modo de avaliação", - "green": "verde", - "yellow": "amarelo", - "red": "vermelho", - "violet": "violeta", - "to": "até", - "and": "e", - "no": "sem", - "his": "dele", - "docu": "documentação", - "of course": "é claro", - "open": "Aberto de", - "unknown": "Desconhecido", - "closed": "Fechado", - "comment": "comentário", - "today": "hoje", - "tomorrow": "amanhã", - // "on weekday": "on", // not needed in this context - "on weekday": " ", // revisar esta - "in duration": "em", - "region": "Região", - "position": "Posição", - "lat": "Latitude", - "lon": "Longitude", - "country": "País", - "state": "Estado", - "status": "Estado", - "examples": "Exemplos", //revisar: maiusculo mesmo? - "none": "nenhum", - "date": "Data", - "time": { // __count__ Can not cover need for Russian language (one, several, many). - "minute": "minuto", - "minute_plural": "minutos", - "minute many": "minutos", - "hour": "hora", - "hour_plural": "horas", - "hour many": "horas", - "day": "dia", - "day_plural": "dias", - "day many": "dias", - "hours minutes sep": "e ", - "now": "Agora", - "time": "tempo", - }, - }, - }, - }, // }}} - - // Italian (it) localization {{{ - it: { - translation: { - "lang": { - "en": "Inglese", - "fr": "Francese", - "de": "Tedesco", - "ru": "Russo", - "it": "Italiano", - "pt": "Portoghese", - "uk": "Ucraino", - "choose": "Scegli lingua", - }, - - "weekdays": { - "word next": { // The italian language use other words for next for sunday. - "mo": "il prossimo", - "tu": "il prossimo", - "we": "il prossimo", - "th": "il prossimo", - "fr": "il prossimo", - "sa": "il prossimo", - "su": "la prossima", - } - }, - "texts": { - "filter": { - "none": "Do not apply any filters", - "error": "Messaggi di errore e di avviso", - "warnOnly": "Solo avvertimenti", - "errorOnly": "Solo errori", - "open": "Solo strutture aperte in questo momento", - "unknown": "Solo strutture che potrebbero essere aperte in questo momento", - "closed": "Solo strutture che sono chiuse in questo momento", - "openOrUnknown": "Solo strutture aperte o che potrebbero esserlo in questo momento", - }, - "open always": "La struttura è sempre aperta", - "unknown always": "La struttura può essere sempre aperta", - "closed always": "La struttura è sempre chiusa (nel breve termine)", - "open now": "In questo momento la struttura è aperta", - "unknown now": "In questo momento la struttura potrebbe essere aperta", - "closed now": "In questo momento la struttura è chiusa", - "will close": "ma sarà chiusa __timestring____comment__.", - "will unknown": "ma potrebbe essere aperta __timestring____comment__.", - "will open": "ma sarà aperta __timestring____comment__.", - "depends on": ", ma dipende da __comment__.", - "week stable": "L'orario è valido per ogni settimana.", - "not week stable": "Attenzione! Questo orario può variare nelle altre settimane.", - "value for": "valore per", - "MatchingRule": "valore base utilizzato dalla regola corrente", - "prettified value": 'valore per opening_hours ottimizzato (questo valore è valido e può essere utilizzato su OSM, dopo aver risolto tutti gli eventuali errori)', - "prettified value for displaying": "valore per opening_hours ottimizzato per la visualizzazione (contiene dei caratteri di fine riga, non può essere usato come valore su OSM)", - "more information": "Per ulteriori informazioni è possibile consultare il wiki di OSM.", - "this website": "Questo sito internet e la libreria Javascript utlizzata per la validazione degli orari di apertura sono sviluppati su __hoster__.", - "if PH is between Mo and Fr": "Solamente se la festività pubblica è un giorno della settimana (da Lunedì a Venerdì)", - "check out error correction, prettify": "Controlla la correzione dell'errore e la funzione di ottimizzazione per il valore di opening_hours", - "SH,PH or PH,SH": "Questo è leggermente diverso da quello precedente. Il nome delle festività scolastiche sovrascriverà quello delle festività pubbliche nei commenti.", - "config POIs": "configura POI", - "reload map": "ricarica mappa", - "heading map": "Mappa con livelli relativi al tag opening_hours basata su OpenStreetMap", - "map is showing": 'questa mappa mostra con dei cerchi colorati i nodi aventi il tag opening_hours:', - "error": "Il valore non può essere analizzato", - "warning": "Se sono presenti degli avvertimenti durante la validazione apparirà una __sign__ blu nell'icona di stato.", - "map filter": "Ci sono alcuni filtri che possono essere applicati per trovare e correggere gli errori o semplicemente per mostrare le strutture aperte o chiuse:", - "data source": 'I dati provengono da __APIaTag__. La mappa è __OSMaTag__.', - "mode 0": 'Solo intervalli di tempo (tag opening_hours, lit)', - "mode 1": 'Solo orari precisi (es. Mo 20:00)', - "mode 2": 'Intervalli di tempo e orari precisi (tag service_times, collection_times)', - "value to long for osm": 'Il valore è troppo lungo per OSM. I valori del database OpenStreetMap sono attualmente limitati a __maxLength__ caratteri. Il valore ottimizzato ha una lunghezza di __pretLength__ e il valore inserito è lungo __valLength__ caratteri.', - "low zoom level": 'I POI cominceranno ad apparire ad un livello di zoom di ${next} e superiore. Il livello di zoom attuale è ${actual}.', - "all n entries": 'Tutti i __total__ risultati:', - "the first entries": 'I primi __number__ di __total__ risultati:', - "load all with JOSM": 'carica tutto in JOSM', - "evaluation tool": 'tool di validazione', - }, - "words": { - "mode": "modalità di validazione", - "green": "verde", - "yellow": "giallo", - "red": "rosso", - "violet": "viola", - "to": "a", - "and": "e", - "no": "no", - "his": "suo", - "docu": "documentazione", - "of course": "certamente", - "open": "aperto", - "unknown": "sconosciuto", - "closed": "chiuso", - "comment": "commento", - "today": "oggi", - "tomorrow": "domani", - // "on weekday": "on", // not needed in this context - "on weekday": " ", - "in duration": "tra", - "region": "regione", - "position": "posizione", - "lat": "latitudine", - "lon": "longitudine", - "country": "nazione", - "state": "stato", - "status": "stato", - "examples": "Esempi", - "none": "nessuno", - "date": "data", - "time": { // __count__ Can not cover need for Russian language (one, several, many). - "minute": "minuto", - "minute_plural": "minuti", - "minute many": "minuti", - "hour": "ora", - "hour_plural": "ore", - "hour many": "ore", - "day": "giorno", - "day_plural": "giorni", - "day many": "giorni", - "hours minutes sep": "e ", - "now": "adesso", - "time": "ora", - }, - }, - }, - }, // }}} - - // Ukrainian (uk) localization {{{ - uk: { - translation: { - "lang": { - "en": "англійська", - "fr": "французька", - "de": "німецька", - "ru": "російська", - "pt": "португальська", - "it": "италійська", - "uk": "українська", - "choose": "Виберіть мову", - }, - - "weekdays": { - "word next": { - "su": "наступну", - "mo": "наступний", - "tu": "наступний", - "we": "наступну", - "th": "наступний", - "fr": "наступну", - "sa": "наступну", - }, - }, - "texts": { - "filter": { - "none": "не використовувати фільтрів", - "error": "про помилки і зауваження", - "warnOnly": "Тільки попередження", - "errorOnly": "Тільки помилки", - "open": "Тільки заходи, що зараз відчинені", - "unknown": "Тільки заходи, що можуть бути зараз відчинені", - "closed": "Тільки заходи, що зараз зачинені", - "openOrUnknown": "Тільки заходи, що зараз відчинені або чий стан невідомий", - }, - "open always": "Захід завжди відчинений.", - "closed always": "Захід завжди зачинений.", - "open now": "Зараз захід відчинений", - "closed now": "Зараз захід зачинений", - "will close": "Зачиниться __timestring____comment__.", - "will open": "Відчинеться __timestring____comment__.", - "will unknown": "але можливо відчиниться __timestring____comment__.", - "week stable": "Розклад вірний для всіх тижнів.", - "not week stable": "УВАГА! Розклад змінюється щотижня.", - "value for": "значення для", - "MatchingRule": "використовувати правила", - - "unknown always": "Захід може бути завжди відчинений", - "unknown now": "Захід може бути зараз відкритим", - "depends on": ", але це залежить від __comment__.", - "prettified value": 'припустиме значення opening_hours (цей вираз можна безпечно використовувати у OSM, після вирішення всіх зауважень)', - "prettified value for displaying": "'припустиме значення opening_hours для відображення (включає кілька рядків, не використовуйте це значення для OSM)", - "more information": "Для додаткової інформації перейдіть на сторінку OSM wiki.", - "this website": "Цей вебсайт та бібліотека JavaScript, що використовуються для розрахунку часів роботи, розроблена на __hoster__.", - "if PH is between Mo and Fr": "Тільки якщо свято у робочий день (Пн-Пт)", - "check out error correction, prettify": "перевірити виправлення помилок та функцію корекції для виразу opening_hours", - "SH,PH or PH,SH": "Цей вираз трохи відрізняється від попереднього. Назва шкільних канікул замінить назви свят у коментарях.", - "config POIs": "налаштувати POI", - "reload map": "перезавантажити мапу", - "heading map": "Мапа з шаром для тегу opening_hours, на основі OpenStreetMap", - "map is showing": 'ця мапа покакзує вузли з тегом opening_hours у вигляді кольорових as colored кіл:', - "error": "Вираз неможливо розпізнати", - "warning": "Якщо Ви отримуєте попередження під час розрахунку, синій __sign__ буде відображений на піктограмі стану.", - "map filter": "Є кілька фільтрів, які можна застосовувати для пошуку і виправлення помилок (QA) або просто відображення відчинених або зачинених заходів:", - "data source": 'Накладені дані взяті з __APIaTag__. Мапа - __OSMaTag__.', - "mode 0": 'Підтримуються тільки часові діапазони (теги opening_hours, lit)', - "mode 1": 'Підтримуються тільки моменти часу', - "mode 2": 'Підтримуються часові діапазони та моменти часу (теги service_times, collection_times)', - "value to long for osm": 'Вираз занадто довгий для OSM. База даних OpenStreetMap на цей час обмежена значеннями до __maxLength__ символів. Прийнятне значення має довжину __pretLength__, а Ваш вираз займає __valLength__ символів', - "low zoom level": "POI почнуть з'являтися на рівні масштабування ${next} та вище. Зараз Ви на ${actual} рівні масштабування.", - "all n entries": 'Усі __total__ записів:', - "the first entries": 'Перші __number__ з __total__ записів:', - "load all with JOSM": "завантажити всі об'єкти з цим виразом у JOSM", - "evaluation tool": 'інструмент розрахунку', - }, - "words": { - "to": "до", - "and": "і", - "no": "Нема", - "open": "з", - "unknown": "невідомий", - "closed": "зачинено", - "comment": "коментарів", - "today": "сьогодні", - "tomorrow": "завтра", - "on weekday": "у ", // optionally in other languages - "in duration": "через", - "region": "регіон", - "position": "положення", - "lat": "широта", - "lon": "довгота", - "country": "країна", - "state": "штат", - "status": "статус", - "examples": "приклади", - "none": "відсутні", - "date": "дата", - "time": { - "minute": "хвилину", - "minute_plural_2": "хвилини", - "minute_plural_5": "хвилин", - "hour": "годину", - "hour_plural_2": "години", - "hour_plural_5": "годин", - "day": "день", - "day_plural_2": "дні", - "day_plural_5": "днів", - "hours minutes sep": "та ", - "now": "зараз", - "time": "час", - }, - "mode": "режим розрахунку", - "green": "зелений", - "yellow": "жовтий", - "red": "червоний", - "violet": "фіолетовий", - "his": "його", - "docu": "документація", - "of course": "звісно", - }, - }, - }, // }}} -}; - -// Functions which generate localized HTML sections {{{ -function getUserSelectTranslateHTMLCode() { - document.write(''); - var res = i18n.t('lang.choose') - + (i18n.lng() !== 'en' ? ' ('+ i18n.t('lang.choose', { lng: 'en' }) +')' : '' ) - + ': '; - for (var lang in resources) { - if (resources.hasOwnProperty(lang)) { - res += ''; - } - } - return res; -} -// }}} - -// Initialization code {{{ -function translatePage() { // Gets called when localization is loaded. - // $(".lang").i18n(); - // $("headline").i18n(); -} - -if (!i18n.isInitialized()) { - i18n.init({ - fallbackLng: 'en', - // resGetPath: 'locales/__ns__.__lng__.json', - resStore: resources, - getAsync: true, - useCookie: true, - debug: true - }, translatePage); -} else { - // compat with an app that already initializes i18n - for (var lang in resources) { - i18n.addResourceBundle(lang, 'translation', resources[lang]['translation'], true); - } -} -moment.locale(i18n.lng()); -// }}} -// }}} diff --git a/js/nominatim_definitions.js b/js/nominatim_definitions.js deleted file mode 100644 index 74d93fc3..00000000 --- a/js/nominatim_definitions.js +++ /dev/null @@ -1,129 +0,0 @@ - -exports.for_loc = { - 'de': { /* Source: https://de.wikipedia.org/wiki/ISO_3166-2:DE */ - /* - * List of all states: bw by be bb hb hh he mv ni nw rp sl sn st sh th - * https://nominatim.openstreetmap.org/reverse?format=json&lat=49.3836&lon=6.9389&zoom=18&addressdetails=1 - * It is easier to use: https://nominatim.openstreetmap.org/search?format=json&q=Berlin&zoom=18&addressdetails=1&limit=1 - * while read state short; do echo $short; curl "https://nominatim.openstreetmap.org/search?format=json&q=$state&zoom=18&addressdetails=1&limit=1"; echo; done < list > list_states - * and a bit of Vim magic: - * * :%s/^\[// - * * :%s/\]$// - * - * results in: - * */ - 'bw': {"place_id":"127592648","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62611","boundingbox":["47.5324787","49.7913277","7.5117461","10.4955731"],"lat":"48.6296972","lon":"9.1949534","display_name":"Baden-Württemberg, Deutschland","class":"boundary","type":"administrative","importance":0.91594179054949,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Baden-Württemberg","country":"Deutschland","country_code":"de"}}, - 'by': {"place_id":"127929545","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"2145268","boundingbox":["47.2701114","50.5647142","8.9763497","13.8396373"],"lat":"48.9467562","lon":"11.4038717","display_name":"Bayern, Deutschland","class":"boundary","type":"administrative","importance":0.86364921148205,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Bayern","country":"Deutschland","country_code":"de"}}, - 'be': {"place_id":"2570600569","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"node","osm_id":"240109189","boundingbox":[52.3570365,52.6770365,13.2288599,13.5488599],"lat":"52.5170365","lon":"13.3888599","display_name":"Berlin, Deutschland","class":"place","type":"city","importance":0.92214979763087,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_place_city.p.20.png","address":{"city":"Berlin","state":"Berlin","country":"Deutschland","country_code":"de"}}, - 'bb': {"place_id":"127637362","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62504","boundingbox":["51.359064","53.5591194","11.2687203","14.7657479"],"lat":"52.8455492","lon":"13.2461296","display_name":"Brandenburg, Deutschland","class":"boundary","type":"administrative","importance":0.77909942030875,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Brandenburg","country":"Deutschland","country_code":"de"}}, - 'hb': {"place_id":"127593591","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62559","boundingbox":["53.0110367","53.5984187","8.4815929","8.9905816"],"lat":"53.0758196","lon":"8.8071646","display_name":"Bremen, Deutschland","class":"place","type":"city","importance":0.763036457778,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_place_city.p.20.png","address":{"city":"Bremen","county":"Bremen","state":"Bremen","country":"Deutschland","country_code":"de"}}, - 'hh': {"place_id":"4992510","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"node","osm_id":"565666208","boundingbox":[50.9837641,56.1037641,7.4499133,12.5699133],"lat":"53.5437641","lon":"10.0099133","display_name":"Hamburg, Deutschland","class":"place","type":"state","importance":0.84914426014249,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Hamburg","country":"Deutschland","country_code":"de"}}, - 'he': {"place_id":"127699835","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62650","boundingbox":["49.3952611","51.657817","7.7724063","10.2364858"],"lat":"50.6118537","lon":"9.1909725","display_name":"Hessen, Deutschland, Europe","class":"boundary","type":"administrative","importance":0.7894576630047,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Hessen","country":"Deutschland","country_code":"de","continent":"Europe"}}, - 'mv': {"place_id":"127614151","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"28322","boundingbox":["53.1098405","54.8849662","10.5938299","14.4125172"],"lat":"53.7735234","lon":"12.5755746","display_name":"Mecklenburg-Vorpommern, Deutschland","class":"boundary","type":"administrative","importance":0.84947984784608,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Mecklenburg-Vorpommern","country":"Deutschland","country_code":"de"}}, - 'ni': {"place_id":"127329231","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62771","boundingbox":["51.2924164","54.1387271","6.3460009","11.598118"],"lat":"52.6368397","lon":"9.8456838","display_name":"Niedersachsen, Deutschland","class":"boundary","type":"administrative","importance":0.76894109111985,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Niedersachsen","country":"Deutschland","country_code":"de"}}, - 'nw': {"place_id":"127732320","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62761","boundingbox":["50.322567","52.5314932","5.8663153","9.4617417"],"lat":"51.4785568","lon":"7.5533645","display_name":"Nordrhein-Westfalen, Deutschland","class":"boundary","type":"administrative","importance":0.88865826551398,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Nordrhein-Westfalen","country":"Deutschland","country_code":"de"}}, - 'rp': {"place_id":"127735203","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62341","boundingbox":["48.9664472","50.9423256","6.1122494","8.5083135"],"lat":"49.7497346","lon":"7.4396553","display_name":"Rheinland-Pfalz, Deutschland","class":"boundary","type":"administrative","importance":0.92600693281803,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Rheinland-Pfalz","country":"Deutschland","country_code":"de"}}, - 'sl': {"place_id":"127646395","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62372","boundingbox":["49.1119612","49.639427","6.3564834","7.4048307"],"lat":"49.4173988","lon":"6.9805789","display_name":"Saarland, Deutschland","class":"boundary","type":"administrative","importance":0.71690372570779,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Saarland","country":"Deutschland","country_code":"de"}}, - 'sn': {"place_id":"127592262","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62467","boundingbox":["50.1713247","51.6847554","11.872254","15.0419319"],"lat":"50.9295798","lon":"13.4585052","display_name":"Sachsen, Deutschland","class":"boundary","type":"administrative","importance":0.79373113008893,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Sachsen","country":"Deutschland","country_code":"de"}}, - 'st': {"place_id":"127749736","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62607","boundingbox":["50.9378508","53.0416917","10.5608128","13.1868819"],"lat":"51.908526","lon":"11.4939134","display_name":"Sachsen-Anhalt, Deutschland","class":"boundary","type":"administrative","importance":0.87575017594291,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Sachsen-Anhalt","country":"Deutschland","country_code":"de"}}, - 'sh': {"place_id":"127640219","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"51529","boundingbox":["53.3598106","55.099161","7.5211615","11.672386"],"lat":"54.1853998","lon":"9.8220089","display_name":"Schleswig-Holstein, Deutschland","class":"boundary","type":"administrative","importance":0.89933973694716,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Schleswig-Holstein","country":"Deutschland","country_code":"de"}}, - 'th': {"place_id":"127635502","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62366","boundingbox":["50.2043467","51.6489423","9.8767193","12.6539178"],"lat":"50.7333163","lon":"11.0747905","display_name":"Thüringen, Deutschland, Europe","class":"boundary","type":"administrative","importance":0.79508440692478,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Thüringen","country":"Deutschland","country_code":"de","continent":"Europe"}}, - - // I started by doing this manually … Just don‘t :) - // 'sl': {"place_id":"16283403","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"node","osm_id":"1552520448","lat":"49.3905678","lon":"6.9250357","display_name":"Landsweiler, Lebach, Landkreis Saarlouis, Saarland, 66822, Deutschland","address":{"suburb":"Landsweiler","town":"Lebach","county":"Landkreis Saarlouis","state":"Saarland","postcode":"66822","country":"Deutschland","country_code":"de"}}, - // 'bw': {"place_id":"44651229","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"36248375","lat":"49.5400039","lon":"9.7937133","display_name":"K 2847, Lauda-K\u00f6nigshofen, Main-Tauber-Kreis, Regierungsbezirk Stuttgart, Baden-W\u00fcrttemberg, Germany, European Union","address":{"road":"K 2847","city":"Lauda-K\u00f6nigshofen","county":"Main-Tauber-Kreis","state_district":"Regierungsbezirk Stuttgart","state":"Baden-W\u00fcrttemberg","country":"Germany","country_code":"de","continent":"European Union"} }, - // 'by': {"place_id":"84131573","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"126502887","lat":"48.13646775","lon":"11.5059719288306","display_name":"7, Heigenmooserstraße, Bezirksteil St. Ulrich, Stadtbezirk 25 Laim, München, Oberbayern, Bayern, 80686, Deutschland","address":{"house_number":"7","road":"Heigenmooserstraße","suburb":"Bezirksteil St. Ulrich","city_district":"Stadtbezirk 25 Laim","city":"München","state_district":"Oberbayern","state":"Bayern","postcode":"80686","country":"Deutschland","country_code":"de"}}, - // 'be': {"place_id":"2570600569","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"node","osm_id":"240109189","boundingbox":[52.3570365,52.6770365,13.2288599,13.5488599],"lat":"52.5170365","lon":"13.3888599","display_name":"Berlin, Deutschland","class":"place","type":"city","importance":0.93214979763087,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_place_city.p.20.png","address":{"city":"Berlin","state":"Berlin","country":"Deutschland","country_code":"de"}}, - // 'bb': {"place_id":"127637362","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62504","boundingbox":["51.359064","53.5591194","11.2687203","14.7657479"],"lat":"52.8455492","lon":"13.2461296","display_name":"Brandenburg, Deutschland","class":"boundary","type":"administrative","importance":0.78909942030875,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"state":"Brandenburg","country":"Deutschland","country_code":"de"}}, - // 'hb': {"place_id":"127593591","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62559","boundingbox":["53.0110367","53.5984187","8.4815929","8.9905816"],"lat":"53.0758196","lon":"8.8071646","display_name":"Bremen, Deutschland","class":"place","type":"city","importance":0.773036457778,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_place_city.p.20.png","address":{"city":"Bremen","county":"Bremen","state":"Bremen","country":"Deutschland","country_code":"de"}}, - }, - 'dk' : { - 'dk': {"place_id":"127691068","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"50046","boundingbox":["54.4516667","57.9524297","7.7153255","15.5530641"],"lat":"55.670249","lon":"10.3333283","display_name":"Denmark","class":"boundary","type":"administrative","importance":0.94221531286648,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"country":"Denmark","country_code":"dk"}} - }, - 'ro' : { /* https://nominatim.openstreetmap.org/search?format=json&q=Romania&zoom=18&addressdetails=1&limit=1 */ - 'ro' : {"place_id":"127691986","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"90689","boundingbox":["43.618682","48.2653964","20.2619773","30.0454257"],"lat":"45.9852129","lon":"24.6859225","display_name":"România","class":"boundary","type":"administrative","importance":0.83930940399775,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"country":"România","country_code":"ro"}} - }, - 'se': { - '_se': { - "_url": "https://nominatim.openstreetmap.org/reverse?format=json&lat=63.1151&lon=16.5767&zoom=18&addressdetails=1&accept-language=en", - "place_id": "144718067", - "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright", - "osm_type": "relation", - "osm_id": "935558", - "lat": "63.167997", - "lon": "15.965908816134", - "display_name": "Ragunda, Jämtlands län, Norrland, Sweden", - "address": { - "county": "Ragunda", - "state": "Jämtlands län", - "country": "Sweden", - "country_code": "se" - }, - "boundingbox": [ - "62.8082014", - "63.5218885", - "15.2350864", - "16.9987048" - ] - }, - }, - 'br': { - '_br': { - "_url": "https://nominatim.openstreetmap.org/reverse?format=json&lat=-10&lon=-52&zoom=18&addressdetails=1&accept-language=en", - "place_id": "116000235", - "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright", - "osm_type": "way", - "osm_id": "242268712", - "lat": "-10.1425809", - "lon": "-51.9179115", - "display_name": "MT-430, Confresa, Microrregião do Norte Araguaia, Mesorregião Nordeste de Mato-Grosso, Mato Grosso, Central-West Region, Brazil", - "address": { - "road": "MT-430", - "town": "Confresa", - "county": "Microrregião do Norte Araguaia", - "state_district": "Mesorregião Nordeste de Mato-Grosso", - "state": "Mato Grosso", - "country": "Brazil", - "country_code": "br" - }, - "boundingbox": [ - "-10.4276788", - "-9.9747152", - "-52.0892082", - "-51.8810199" - ] - }, - }, - 'hu': { - '_hu': { - "_url": "https://nominatim.openstreetmap.org/reverse?format=json&lat=47.4821&lon=19.0640&zoom=18&addressdetails=1&accept-language=en", - "place_id": "76509191", - "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright", - "osm_type": "way", - "osm_id": "67327954", - "lat": "47.48146955", - "lon": "19.0639924870181", - "display_name": "Nehru part, Közraktár utca, Belső-Ferencváros, 9th district, Budapest, Central Hungary, Közép-Magyarország, 1092, Hungary", - "address": { - "park": "Nehru part", - "road": "Közraktár utca", - "suburb": "Belső-Ferencváros", - "city_district": "9th district", - "city": "Budapest", - "region": "Közép-Magyarország", - "postcode": "1092", - "country": "Hungary", - "country_code": "hu" - }, - "boundingbox": [ - "47.4799813", - "47.4829177", - "19.0619122", - "19.0657089" - ], - }, - }, - 'sk' : { /* https://nominatim.openstreetmap.org/search?format=json&q=Slovakia&zoom=18&addressdetails=1&limit=1 */ - 'sk' : {"place_id":"158550995","licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"14296","boundingbox":["47.7314286","49.6138162","16.8331891","22.56571"],"lat":"48.7411522","lon":"19.4528646","display_name":"Slovensko","class":"boundary","type":"administrative","importance":0.79910907103218,"icon":"https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","address":{"country":"Slovensko","country_code":"sk"}} - } -}; diff --git a/locales/lang.yaml b/locales/lang.yaml index dccf3ca6..22d990b1 100644 --- a/locales/lang.yaml +++ b/locales/lang.yaml @@ -66,6 +66,7 @@ 'unexpected token holiday': 'Unexpected token (holiday parser): __token__' 'no holiday definition': 'There are no holidays (__name__) defined for country __cc__.' 'no holiday definition state': 'There are no holidays (__name__) defined for country __cc__ and state __state__.' +'no SH definition': 'School holiday __name__ has no definition for the year __year__.' 'no country code': 'Country code missing which is needed to select the correct holidays (see README how to provide it)' 'movable no formula': 'Movable day __name__ can not not be calculated. Please add the formula how to calculate it.' 'movable not in year': 'The movable day __name__ plus __days__ days is not in the year of the movable day anymore. Currently not supported.' diff --git a/package.json b/package.json index 92a0bf4f..92510028 100644 --- a/package.json +++ b/package.json @@ -49,13 +49,14 @@ "assert": "^1.3.0", "colors": "^0.6.2", "https": "^1.0.0", + "js-yaml": "^3.8.2", + "line-reader": "^0.4.0", + "optimist": "^0.6.1", + "package-json-validator": "^0.6.0", "rollup": "^0.41.4", "rollup-plugin-commonjs": "^7.0.0", "rollup-plugin-node-resolve": "^2.0.0", "rollup-plugin-yaml": "^1.0.0", - "line-reader": "^0.4.0", - "optimist": "^0.6.1", - "package-json-validator": "^0.6.0", "sprintf-js": "^1.0.3", "timekeeper": "^1.0.0", "uglify-js": "^2.6.0" diff --git a/taginfo.json b/taginfo.json index 4a9c6660..17e7144e 100644 --- a/taginfo.json +++ b/taginfo.json @@ -1,11 +1,11 @@ { "data_format": 1, - "data_url": "https://raw.githubusercontent.com/ypid/opening_hours.js/master/taginfo.json", + "data_url": "https://raw.githubusercontent.com/opening-hours/opening_hours.js/master/taginfo.json", "project": { "name": "opening_hours evaluation tool", "description": "Advanced opening_hours testing tool", "project_url": "http://openingh.openstreetmap.de/evaluation_tool/", - "doc_url": "https://github.com/ypid/opening_hours.js", + "doc_url": "https://github.com/opening-hours/opening_hours.js", "icon_url": "http://openingh.openstreetmap.de/evaluation_tool/favicon.png", "contact_name": "Robin Schneider", "contact_email": "ypid@riseup.net" diff --git a/taginfo_template.json b/taginfo_template.json index 473db8dd..e49ee81f 100644 --- a/taginfo_template.json +++ b/taginfo_template.json @@ -1,11 +1,11 @@ { "data_format": 1, - "data_url": "https://raw.githubusercontent.com/ypid/opening_hours.js/master/taginfo.json", + "data_url": "https://raw.githubusercontent.com/opening-hours/opening_hours.js/master/taginfo.json", "project": { "name": "opening_hours evaluation tool", "description": "Advanced opening_hours testing tool", "project_url": "http://openingh.openstreetmap.de/evaluation_tool/", - "doc_url": "https://github.com/ypid/opening_hours.js", + "doc_url": "https://github.com/opening-hours/opening_hours.js", "icon_url": "http://openingh.openstreetmap.de/evaluation_tool/favicon.png", "contact_name": "Robin Schneider", "contact_email": "ypid@riseup.net" diff --git a/test.de.log b/test.de.log index 8d3c9aee..691dff0b 100644 --- a/test.de.log +++ b/test.de.log @@ -480,11 +480,32 @@ With warnings: With warnings: *daylight <--- (Please use notation "sunrise-sunset" for "daylight".) "Variable times calculation with coordinates" for "(sunrise+02:00)-sunset": PASSED -"Variable times which moves over fix end time" for "sunrise-08:02": PASSED +"Variable times which moves over fix end time" for "sunrise-08:02": FAILED, bad duration(s): 1860000,0, expected 1800000,0, bad intervals: +[ '2013.01.27 08:01', '2013.01.27 08:02', false, undefined ], +[ '2013.01.28 08:00', '2013.01.28 08:02', false, undefined ], +[ '2013.01.29 07:59', '2013.01.29 08:02', false, undefined ], +[ '2013.01.30 07:58', '2013.01.30 08:02', false, undefined ], +[ '2013.01.31 07:56', '2013.01.31 08:02', false, undefined ], +[ '2013.02.01 07:55', '2013.02.01 08:02', false, undefined ], +[ '2013.02.02 07:54', '2013.02.02 08:02', false, undefined ], +expected: +[ '2013.01.28 08:00', '2013.01.28 08:02', false, undefined ], +[ '2013.01.29 07:59', '2013.01.29 08:02', false, undefined ], +[ '2013.01.30 07:58', '2013.01.30 08:02', false, undefined ], +[ '2013.01.31 07:56', '2013.01.31 08:02', false, undefined ], +[ '2013.02.01 07:55', '2013.02.01 08:02', false, undefined ], +[ '2013.02.02 07:54', '2013.02.02 08:02', false, undefined ], "Variable times which moves over fix end time" for "sunrise-08:00": PASSED "Variable times which moves over fix end time" for "sunrise-07:58": PASSED "Variable times which moves over fix end time" for "sunrise-06:00": PASSED -"Variable times which moves over fix end time" for "sunrise-05:59": PASSED +"Variable times which moves over fix end time" for "sunrise-05:59": FAILED, bad duration(s): 158220000,0, expected 158160000,0, bad intervals: +[ '2013.01.26 00:00', '2013.01.26 05:59', false, undefined ], +[ '2013.01.26 08:01', '2013.01.27 05:59', false, undefined ], +[ '2013.01.27 08:00', '2013.01.28 00:00', false, undefined ], +expected: +[ '2013.01.26 00:00', '2013.01.26 05:59', false, undefined ], +[ '2013.01.26 08:02', '2013.01.27 05:59', false, undefined ], +[ '2013.01.27 08:00', '2013.01.28 00:00', false, undefined ], "Variable times which moves over fix end time" for "sunrise-06:00": PASSED "Variable times which moves over fix end time" for "sunrise-05:59": IGNORED, reason: not implemented yet "Variable times spanning midnight" for "sunset-sunrise": PASSED @@ -1711,9 +1732,9 @@ expected: "Based on real world example: Is processed right." for "Apr-Oct: Sa-Su 08:00-15:00, May-Sep: 00:00-24:00": PASSED "Based on real world example: Is processed right." for "Apr-Oct: Sa-Su 08:00-15:00; May-Sep: 00:00-24:00": PASSED "Real world example: Was not processed right." for "Mo-Fr 07:00-19:30; Sa-Su 08:00-19:30; 19:30-21:00 open "No new laundry loads in"; Nov Th[4] off; Dec 25 off": PASSED -Bei der Auswertung des Wertes "Jan off; Feb off; Mar off; Apr Tu-Su 10:00-14:30, May Tu-Su 10:00-14:30; Jun Tu-Su 09:00-16:00; Jul Tu-Su 10:00-17:00; Aug Tu-Su 10:00-17:00; Sep Tu-Su 10:00-14:30; Oct Tu-Su 10:00-14:30 Nov off; Dec off" ist ein Fehler aufgetreten. Bitte melde diesen Fehler oder korrigiere diesen mittels eines Pull Requests oder Patches: https://github.com/ypid/opening_hours.js. Bug in warning generation code which could not determine the exact position of the warning or error in value. +Bei der Auswertung des Wertes "Jan off; Feb off; Mar off; Apr Tu-Su 10:00-14:30, May Tu-Su 10:00-14:30; Jun Tu-Su 09:00-16:00; Jul Tu-Su 10:00-17:00; Aug Tu-Su 10:00-17:00; Sep Tu-Su 10:00-14:30; Oct Tu-Su 10:00-14:30 Nov off; Dec off" ist ein Fehler aufgetreten. Bitte melde diesen Fehler oder korrigiere diesen mittels eines Pull Requests oder Patches: https://github.com/opening-hours/opening_hours.js. Bug in warning generation code which could not determine the exact position of the warning or error in value. tokens[nrule][2] is undefined. This is ok if nrule is the last rule. -Bei der Auswertung des Wertes "Jan off; Feb off; Mar off; Apr Tu-Su 10:00-14:30, May Tu-Su 10:00-14:30; Jun Tu-Su 09:00-16:00; Jul Tu-Su 10:00-17:00; Aug Tu-Su 10:00-17:00; Sep Tu-Su 10:00-14:30; Oct Tu-Su 10:00-14:30 Nov off; Dec off" ist ein Fehler aufgetreten. Bitte melde diesen Fehler oder korrigiere diesen mittels eines Pull Requests oder Patches: https://github.com/ypid/opening_hours.js. Bug in warning generation code which could not determine the exact position of the warning or error in value. +Bei der Auswertung des Wertes "Jan off; Feb off; Mar off; Apr Tu-Su 10:00-14:30, May Tu-Su 10:00-14:30; Jun Tu-Su 09:00-16:00; Jul Tu-Su 10:00-17:00; Aug Tu-Su 10:00-17:00; Sep Tu-Su 10:00-14:30; Oct Tu-Su 10:00-14:30 Nov off; Dec off" ist ein Fehler aufgetreten. Bitte melde diesen Fehler oder korrigiere diesen mittels eines Pull Requests oder Patches: https://github.com/opening-hours/opening_hours.js. Bug in warning generation code which could not determine the exact position of the warning or error in value. tokens[nrule][2] is undefined. This is ok if nrule is the last rule. "Real world example: Was not processed right" for "Jan off; Feb off; Mar off; Apr Tu-Su 10:00-14:30, May Tu-Su 10:00-14:30; Jun Tu-Su 09:00-16:00; Jul Tu-Su 10:00-17:00; Aug Tu-Su 10:00-17:00; Sep Tu-Su 10:00-14:30; Oct Tu-Su 10:00-14:30 Nov off; Dec off": PASSED With warnings: @@ -1837,8 +1858,196 @@ With warnings: *Monday-Wednesday 07:00; Thursday,Friday 05:45; Monday[1] 07:30; school holidays Monday-Friday <--- (Please use the abbreviation "Fr" for "friday".) *Monday-Wednesday 07:00; Thursday,Friday 05:45; Monday[1] 07:30; school holidays Monday-Friday (sunrise+03:00); public holidays <--- (Please use notation "PH" for "public holidays".) "Points in time, extrem example useful for ComplexAlarm" for "Mo-We 07:00; Th,Fr 05:45; Mo[1] 07:30; SH Mo-Fr (sunrise+03:00); PH off": PASSED -"Points in time, extrem example useful for ComplexAlarm" for "Mo-We 07:00; Th 05:45; week 01-53/2 Fr 07:05; week 02-53/2 Fr 05:45; SH Mo-Fr (sunrise+03:00); PH off": PASSED -"Points in time, extrem example useful for ComplexAlarm" for "Mo-We 07:00; Th 05:45; week 01-53/2 Fr 07:05; week 02-53/2 Fr 05:45; SH Mo-Fr (sunrise+03:00); PH off; easter -2 days-easter +2 days off "My little break from work every year."; 2014 Sep 01-2014 Sep 07 off "My vacations …"": PASSED +"Points in time, extrem example useful for ComplexAlarm" for "Mo-We 07:00; Th 05:45; week 01-53/2 Fr 07:05; week 02-53/2 Fr 05:45; SH Mo-Fr (sunrise+03:00); PH off": FAILED, bad intervals: +[ '2014.08.25 09:27', '2014.08.25 09:28', false, 'Sommerferien' ], +[ '2014.08.26 09:28', '2014.08.26 09:29', false, 'Sommerferien' ], +[ '2014.08.27 09:30', '2014.08.27 09:31', false, 'Sommerferien' ], +[ '2014.08.28 09:31', '2014.08.28 09:32', false, 'Sommerferien' ], +[ '2014.08.29 09:33', '2014.08.29 09:34', false, 'Sommerferien' ], +[ '2014.09.01 09:37', '2014.09.01 09:38', false, 'Sommerferien' ], +[ '2014.09.02 09:39', '2014.09.02 09:40', false, 'Sommerferien' ], +[ '2014.09.03 09:40', '2014.09.03 09:41', false, 'Sommerferien' ], +[ '2014.09.04 09:41', '2014.09.04 09:42', false, 'Sommerferien' ], +[ '2014.09.05 09:43', '2014.09.05 09:44', false, 'Sommerferien' ], +[ '2014.09.08 09:47', '2014.09.08 09:48', false, 'Sommerferien' ], +[ '2014.09.09 09:49', '2014.09.09 09:50', false, 'Sommerferien' ], +[ '2014.09.10 09:50', '2014.09.10 09:51', false, 'Sommerferien' ], +[ '2014.09.11 09:52', '2014.09.11 09:53', false, 'Sommerferien' ], +[ '2014.09.12 09:53', '2014.09.12 09:54', false, 'Sommerferien' ], +[ '2014.09.15 07:00', '2014.09.15 07:01', false, undefined ], +[ '2014.09.16 07:00', '2014.09.16 07:01', false, undefined ], +[ '2014.09.17 07:00', '2014.09.17 07:01', false, undefined ], +[ '2014.09.18 05:45', '2014.09.18 05:46', false, undefined ], +[ '2014.09.19 05:45', '2014.09.19 05:46', false, undefined ], +[ '2014.09.22 07:00', '2014.09.22 07:01', false, undefined ], +[ '2014.09.23 07:00', '2014.09.23 07:01', false, undefined ], +[ '2014.09.24 07:00', '2014.09.24 07:01', false, undefined ], +[ '2014.09.25 05:45', '2014.09.25 05:46', false, undefined ], +[ '2014.09.26 07:05', '2014.09.26 07:06', false, undefined ], +[ '2014.09.29 07:00', '2014.09.29 07:01', false, undefined ], +[ '2014.09.30 07:00', '2014.09.30 07:01', false, undefined ], +[ '2014.10.01 07:00', '2014.10.01 07:01', false, undefined ], +[ '2014.10.02 05:45', '2014.10.02 05:46', false, undefined ], +[ '2014.10.06 07:00', '2014.10.06 07:01', false, undefined ], +[ '2014.10.07 07:00', '2014.10.07 07:01', false, undefined ], +[ '2014.10.08 07:00', '2014.10.08 07:01', false, undefined ], +[ '2014.10.09 05:45', '2014.10.09 05:46', false, undefined ], +[ '2014.10.10 07:05', '2014.10.10 07:06', false, undefined ], +[ '2014.10.13 07:00', '2014.10.13 07:01', false, undefined ], +[ '2014.10.14 07:00', '2014.10.14 07:01', false, undefined ], +[ '2014.10.15 07:00', '2014.10.15 07:01', false, undefined ], +[ '2014.10.16 05:45', '2014.10.16 05:46', false, undefined ], +[ '2014.10.17 05:45', '2014.10.17 05:46', false, undefined ], +[ '2014.10.20 07:00', '2014.10.20 07:01', false, undefined ], +[ '2014.10.21 07:00', '2014.10.21 07:01', false, undefined ], +[ '2014.10.22 07:00', '2014.10.22 07:01', false, undefined ], +[ '2014.10.23 05:45', '2014.10.23 05:46', false, undefined ], +[ '2014.10.24 07:05', '2014.10.24 07:06', false, undefined ], +[ '2014.10.27 10:01', '2014.10.27 10:02', false, 'Herbstferien' ], +[ '2014.10.28 10:03', '2014.10.28 10:04', false, 'Herbstferien' ], +[ '2014.10.29 10:05', '2014.10.29 10:06', false, 'Herbstferien' ], +[ '2014.10.30 10:06', '2014.10.30 10:07', false, 'Herbstferien' ], +[ '2014.10.31 05:45', '2014.10.31 05:46', false, undefined ], +expected: +[ '2014.08.25 09:27', '2014.08.25 09:28', false, 'Sommerferien' ], +[ '2014.08.26 09:28', '2014.08.26 09:29', false, 'Sommerferien' ], +[ '2014.08.27 09:30', '2014.08.27 09:31', false, 'Sommerferien' ], +[ '2014.08.28 09:31', '2014.08.28 09:32', false, 'Sommerferien' ], +[ '2014.08.29 09:33', '2014.08.29 09:34', false, 'Sommerferien' ], +[ '2014.09.01 09:37', '2014.09.01 09:38', false, 'Sommerferien' ], +[ '2014.09.02 09:39', '2014.09.02 09:40', false, 'Sommerferien' ], +[ '2014.09.03 09:40', '2014.09.03 09:41', false, 'Sommerferien' ], +[ '2014.09.04 09:42', '2014.09.04 09:43', false, 'Sommerferien' ], +[ '2014.09.05 09:43', '2014.09.05 09:44', false, 'Sommerferien' ], +[ '2014.09.08 09:47', '2014.09.08 09:48', false, 'Sommerferien' ], +[ '2014.09.09 09:49', '2014.09.09 09:50', false, 'Sommerferien' ], +[ '2014.09.10 09:50', '2014.09.10 09:51', false, 'Sommerferien' ], +[ '2014.09.11 09:52', '2014.09.11 09:53', false, 'Sommerferien' ], +[ '2014.09.12 09:53', '2014.09.12 09:54', false, 'Sommerferien' ], +[ '2014.09.15 07:00', '2014.09.15 07:01', false, undefined ], +[ '2014.09.16 07:00', '2014.09.16 07:01', false, undefined ], +[ '2014.09.17 07:00', '2014.09.17 07:01', false, undefined ], +[ '2014.09.18 05:45', '2014.09.18 05:46', false, undefined ], +[ '2014.09.19 05:45', '2014.09.19 05:46', false, undefined ], +[ '2014.09.22 07:00', '2014.09.22 07:01', false, undefined ], +[ '2014.09.23 07:00', '2014.09.23 07:01', false, undefined ], +[ '2014.09.24 07:00', '2014.09.24 07:01', false, undefined ], +[ '2014.09.25 05:45', '2014.09.25 05:46', false, undefined ], +[ '2014.09.26 07:05', '2014.09.26 07:06', false, undefined ], +[ '2014.09.29 07:00', '2014.09.29 07:01', false, undefined ], +[ '2014.09.30 07:00', '2014.09.30 07:01', false, undefined ], +[ '2014.10.01 07:00', '2014.10.01 07:01', false, undefined ], +[ '2014.10.02 05:45', '2014.10.02 05:46', false, undefined ], +[ '2014.10.06 07:00', '2014.10.06 07:01', false, undefined ], +[ '2014.10.07 07:00', '2014.10.07 07:01', false, undefined ], +[ '2014.10.08 07:00', '2014.10.08 07:01', false, undefined ], +[ '2014.10.09 05:45', '2014.10.09 05:46', false, undefined ], +[ '2014.10.10 07:05', '2014.10.10 07:06', false, undefined ], +[ '2014.10.13 07:00', '2014.10.13 07:01', false, undefined ], +[ '2014.10.14 07:00', '2014.10.14 07:01', false, undefined ], +[ '2014.10.15 07:00', '2014.10.15 07:01', false, undefined ], +[ '2014.10.16 05:45', '2014.10.16 05:46', false, undefined ], +[ '2014.10.17 05:45', '2014.10.17 05:46', false, undefined ], +[ '2014.10.20 07:00', '2014.10.20 07:01', false, undefined ], +[ '2014.10.21 07:00', '2014.10.21 07:01', false, undefined ], +[ '2014.10.22 07:00', '2014.10.22 07:01', false, undefined ], +[ '2014.10.23 05:45', '2014.10.23 05:46', false, undefined ], +[ '2014.10.24 07:05', '2014.10.24 07:06', false, undefined ], +[ '2014.10.27 10:02', '2014.10.27 10:03', false, 'Herbstferien' ], +[ '2014.10.28 10:03', '2014.10.28 10:04', false, 'Herbstferien' ], +[ '2014.10.29 10:05', '2014.10.29 10:06', false, 'Herbstferien' ], +[ '2014.10.30 10:06', '2014.10.30 10:07', false, 'Herbstferien' ], +[ '2014.10.31 05:45', '2014.10.31 05:46', false, undefined ], +"Points in time, extrem example useful for ComplexAlarm" for "Mo-We 07:00; Th 05:45; week 01-53/2 Fr 07:05; week 02-53/2 Fr 05:45; SH Mo-Fr (sunrise+03:00); PH off; easter -2 days-easter +2 days off "My little break from work every year."; 2014 Sep 01-2014 Sep 07 off "My vacations …"": FAILED, bad intervals: +[ '2014.08.25 09:27', '2014.08.25 09:28', false, 'Sommerferien' ], +[ '2014.08.26 09:28', '2014.08.26 09:29', false, 'Sommerferien' ], +[ '2014.08.27 09:30', '2014.08.27 09:31', false, 'Sommerferien' ], +[ '2014.08.28 09:31', '2014.08.28 09:32', false, 'Sommerferien' ], +[ '2014.08.29 09:33', '2014.08.29 09:34', false, 'Sommerferien' ], +[ '2014.09.08 09:47', '2014.09.08 09:48', false, 'Sommerferien' ], +[ '2014.09.09 09:49', '2014.09.09 09:50', false, 'Sommerferien' ], +[ '2014.09.10 09:50', '2014.09.10 09:51', false, 'Sommerferien' ], +[ '2014.09.11 09:52', '2014.09.11 09:53', false, 'Sommerferien' ], +[ '2014.09.12 09:53', '2014.09.12 09:54', false, 'Sommerferien' ], +[ '2014.09.15 07:00', '2014.09.15 07:01', false, undefined ], +[ '2014.09.16 07:00', '2014.09.16 07:01', false, undefined ], +[ '2014.09.17 07:00', '2014.09.17 07:01', false, undefined ], +[ '2014.09.18 05:45', '2014.09.18 05:46', false, undefined ], +[ '2014.09.19 05:45', '2014.09.19 05:46', false, undefined ], +[ '2014.09.22 07:00', '2014.09.22 07:01', false, undefined ], +[ '2014.09.23 07:00', '2014.09.23 07:01', false, undefined ], +[ '2014.09.24 07:00', '2014.09.24 07:01', false, undefined ], +[ '2014.09.25 05:45', '2014.09.25 05:46', false, undefined ], +[ '2014.09.26 07:05', '2014.09.26 07:06', false, undefined ], +[ '2014.09.29 07:00', '2014.09.29 07:01', false, undefined ], +[ '2014.09.30 07:00', '2014.09.30 07:01', false, undefined ], +[ '2014.10.01 07:00', '2014.10.01 07:01', false, undefined ], +[ '2014.10.02 05:45', '2014.10.02 05:46', false, undefined ], +[ '2014.10.06 07:00', '2014.10.06 07:01', false, undefined ], +[ '2014.10.07 07:00', '2014.10.07 07:01', false, undefined ], +[ '2014.10.08 07:00', '2014.10.08 07:01', false, undefined ], +[ '2014.10.09 05:45', '2014.10.09 05:46', false, undefined ], +[ '2014.10.10 07:05', '2014.10.10 07:06', false, undefined ], +[ '2014.10.13 07:00', '2014.10.13 07:01', false, undefined ], +[ '2014.10.14 07:00', '2014.10.14 07:01', false, undefined ], +[ '2014.10.15 07:00', '2014.10.15 07:01', false, undefined ], +[ '2014.10.16 05:45', '2014.10.16 05:46', false, undefined ], +[ '2014.10.17 05:45', '2014.10.17 05:46', false, undefined ], +[ '2014.10.20 07:00', '2014.10.20 07:01', false, undefined ], +[ '2014.10.21 07:00', '2014.10.21 07:01', false, undefined ], +[ '2014.10.22 07:00', '2014.10.22 07:01', false, undefined ], +[ '2014.10.23 05:45', '2014.10.23 05:46', false, undefined ], +[ '2014.10.24 07:05', '2014.10.24 07:06', false, undefined ], +[ '2014.10.27 10:01', '2014.10.27 10:02', false, 'Herbstferien' ], +[ '2014.10.28 10:03', '2014.10.28 10:04', false, 'Herbstferien' ], +[ '2014.10.29 10:05', '2014.10.29 10:06', false, 'Herbstferien' ], +[ '2014.10.30 10:06', '2014.10.30 10:07', false, 'Herbstferien' ], +[ '2014.10.31 05:45', '2014.10.31 05:46', false, undefined ], +expected: +[ '2014.08.25 09:27', '2014.08.25 09:28', false, 'Sommerferien' ], +[ '2014.08.26 09:28', '2014.08.26 09:29', false, 'Sommerferien' ], +[ '2014.08.27 09:30', '2014.08.27 09:31', false, 'Sommerferien' ], +[ '2014.08.28 09:31', '2014.08.28 09:32', false, 'Sommerferien' ], +[ '2014.08.29 09:33', '2014.08.29 09:34', false, 'Sommerferien' ], +[ '2014.09.08 09:47', '2014.09.08 09:48', false, 'Sommerferien' ], +[ '2014.09.09 09:49', '2014.09.09 09:50', false, 'Sommerferien' ], +[ '2014.09.10 09:50', '2014.09.10 09:51', false, 'Sommerferien' ], +[ '2014.09.11 09:52', '2014.09.11 09:53', false, 'Sommerferien' ], +[ '2014.09.12 09:53', '2014.09.12 09:54', false, 'Sommerferien' ], +[ '2014.09.15 07:00', '2014.09.15 07:01', false, undefined ], +[ '2014.09.16 07:00', '2014.09.16 07:01', false, undefined ], +[ '2014.09.17 07:00', '2014.09.17 07:01', false, undefined ], +[ '2014.09.18 05:45', '2014.09.18 05:46', false, undefined ], +[ '2014.09.19 05:45', '2014.09.19 05:46', false, undefined ], +[ '2014.09.22 07:00', '2014.09.22 07:01', false, undefined ], +[ '2014.09.23 07:00', '2014.09.23 07:01', false, undefined ], +[ '2014.09.24 07:00', '2014.09.24 07:01', false, undefined ], +[ '2014.09.25 05:45', '2014.09.25 05:46', false, undefined ], +[ '2014.09.26 07:05', '2014.09.26 07:06', false, undefined ], +[ '2014.09.29 07:00', '2014.09.29 07:01', false, undefined ], +[ '2014.09.30 07:00', '2014.09.30 07:01', false, undefined ], +[ '2014.10.01 07:00', '2014.10.01 07:01', false, undefined ], +[ '2014.10.02 05:45', '2014.10.02 05:46', false, undefined ], +[ '2014.10.06 07:00', '2014.10.06 07:01', false, undefined ], +[ '2014.10.07 07:00', '2014.10.07 07:01', false, undefined ], +[ '2014.10.08 07:00', '2014.10.08 07:01', false, undefined ], +[ '2014.10.09 05:45', '2014.10.09 05:46', false, undefined ], +[ '2014.10.10 07:05', '2014.10.10 07:06', false, undefined ], +[ '2014.10.13 07:00', '2014.10.13 07:01', false, undefined ], +[ '2014.10.14 07:00', '2014.10.14 07:01', false, undefined ], +[ '2014.10.15 07:00', '2014.10.15 07:01', false, undefined ], +[ '2014.10.16 05:45', '2014.10.16 05:46', false, undefined ], +[ '2014.10.17 05:45', '2014.10.17 05:46', false, undefined ], +[ '2014.10.20 07:00', '2014.10.20 07:01', false, undefined ], +[ '2014.10.21 07:00', '2014.10.21 07:01', false, undefined ], +[ '2014.10.22 07:00', '2014.10.22 07:01', false, undefined ], +[ '2014.10.23 05:45', '2014.10.23 05:46', false, undefined ], +[ '2014.10.24 07:05', '2014.10.24 07:06', false, undefined ], +[ '2014.10.27 10:02', '2014.10.27 10:03', false, 'Herbstferien' ], +[ '2014.10.28 10:03', '2014.10.28 10:04', false, 'Herbstferien' ], +[ '2014.10.29 10:05', '2014.10.29 10:06', false, 'Herbstferien' ], +[ '2014.10.30 10:06', '2014.10.30 10:07', false, 'Herbstferien' ], +[ '2014.10.31 05:45', '2014.10.31 05:46', false, undefined ], "Points in time, period times" for "Mo-Fr 10:00-16:00/01:30": PASSED "Points in time, period times" for "Mo-Fr 10:00-16:00/90": PASSED "Points in time, period times" for "Mo-Fr 10:00-16:00/90; Sa off "testing at end for parser"": PASSED @@ -2653,13 +2862,13 @@ sunrise-( <--- (Die Zeitspanne geht nicht wie erwartet weiter) "Time range does not continue as expected for mode === 2." for "sunrise-sunset,(; 00:23-00:42 unknown "warning at correct position?"": PASSED sunrise-sunset,( <--- (Missing variable time (e.g. sunrise) after: "(") -Bei der Auswertung des Wertes "Mo-Fr 10:00-20:00; PH off" ist ein Fehler aufgetreten. Du kannst dies korrigieren, indem du das Problem löst und in Form eines Pull Requests oder Patches zum Projekt beiträgst: https://github.com/ypid/opening_hours.js. PH ist für das Land none nicht definiert. +Bei der Auswertung des Wertes "Mo-Fr 10:00-20:00; PH off" ist ein Fehler aufgetreten. Du kannst dies korrigieren, indem du das Problem löst und in Form eines Pull Requests oder Patches zum Projekt beiträgst: https://github.com/opening-hours/opening_hours.js. PH ist für das Land none nicht definiert. "PH with non-existing address." for "Mo-Fr 10:00-20:00; PH off": PASSED -Bei der Auswertung des Wertes "Mo-Fr 10:00-20:00; PH off" ist ein Fehler aufgetreten. Du kannst dies korrigieren, indem du das Problem löst und in Form eines Pull Requests oder Patches zum Projekt beiträgst: https://github.com/ypid/opening_hours.js. PH ist für das Land none nicht definiert. +Bei der Auswertung des Wertes "Mo-Fr 10:00-20:00; PH off" ist ein Fehler aufgetreten. Du kannst dies korrigieren, indem du das Problem löst und in Form eines Pull Requests oder Patches zum Projekt beiträgst: https://github.com/opening-hours/opening_hours.js. PH ist für das Land none nicht definiert. -Bei der Auswertung des Wertes "Mo-Fr 10:00-20:00; SH off" ist ein Fehler aufgetreten. Du kannst dies korrigieren, indem du das Problem löst und in Form eines Pull Requests oder Patches zum Projekt beiträgst: https://github.com/ypid/opening_hours.js. SH ist für das Land none nicht definiert. +Bei der Auswertung des Wertes "Mo-Fr 10:00-20:00; SH off" ist ein Fehler aufgetreten. Du kannst dies korrigieren, indem du das Problem löst und in Form eines Pull Requests oder Patches zum Projekt beiträgst: https://github.com/opening-hours/opening_hours.js. SH ist für das Land none nicht definiert. "SH with non-existing address." for "Mo-Fr 10:00-20:00; SH off": PASSED -Bei der Auswertung des Wertes "Mo-Fr 10:00-20:00; SH off" ist ein Fehler aufgetreten. Du kannst dies korrigieren, indem du das Problem löst und in Form eines Pull Requests oder Patches zum Projekt beiträgst: https://github.com/ypid/opening_hours.js. SH ist für das Land none nicht definiert. +Bei der Auswertung des Wertes "Mo-Fr 10:00-20:00; SH off" ist ein Fehler aufgetreten. Du kannst dies korrigieren, indem du das Problem löst und in Form eines Pull Requests oder Patches zum Projekt beiträgst: https://github.com/opening-hours/opening_hours.js. SH ist für das Land none nicht definiert. "Trying to trigger "Missing minutes in time range after" for mode === 0." for "Mon-Sun 14-": PASSED Mon-Sun 14- <--- (Missing time separator in time range after: "number") @@ -2715,10 +2924,10 @@ Su 7:30,10 <--- (Missing time separator in time range after: "number") "Trying to trigger "Missing time separator in time range after" for mode === 2." for "Su 7:30,10i00,22:00": PASSED Su 7:30,10i <--- (Missing time separator in time range after: "number") -"Wrong constructor call should throw an error: nominatimJSON: string" for "1": PASSED +"Wrong constructor call should throw an error: nominatim_data: string" for "1": PASSED Der Wert (erster Parameter) ist kein String -"Wrong constructor call should throw an error: nominatimJSON: string" for "Mo-Fr 08:00-16:00": PASSED +"Wrong constructor call should throw an error: nominatim_data: string" for "Mo-Fr 08:00-16:00": PASSED The nominatim_object parameter is of unknown type. Given string, expected object. "Wrong constructor call should throw an error: "string"" for "Mo-Fr 12:00-18:00; We off; Sa,PH 12:00-17:00; Th[3],Th[-1] off": PASSED diff --git a/test.en.log b/test.en.log index 22e057f6..822d7f74 100644 --- a/test.en.log +++ b/test.en.log @@ -301,11 +301,32 @@ With warnings: With warnings: *daylight <--- (Please use notation "sunrise-sunset" for "daylight".) "Variable times calculation with coordinates" for "(sunrise+02:00)-sunset": PASSED -"Variable times which moves over fix end time" for "sunrise-08:02": PASSED +"Variable times which moves over fix end time" for "sunrise-08:02": FAILED, bad duration(s): 1860000,0, expected 1800000,0, bad intervals: +[ '2013.01.27 08:01', '2013.01.27 08:02', false, undefined ], +[ '2013.01.28 08:00', '2013.01.28 08:02', false, undefined ], +[ '2013.01.29 07:59', '2013.01.29 08:02', false, undefined ], +[ '2013.01.30 07:58', '2013.01.30 08:02', false, undefined ], +[ '2013.01.31 07:56', '2013.01.31 08:02', false, undefined ], +[ '2013.02.01 07:55', '2013.02.01 08:02', false, undefined ], +[ '2013.02.02 07:54', '2013.02.02 08:02', false, undefined ], +expected: +[ '2013.01.28 08:00', '2013.01.28 08:02', false, undefined ], +[ '2013.01.29 07:59', '2013.01.29 08:02', false, undefined ], +[ '2013.01.30 07:58', '2013.01.30 08:02', false, undefined ], +[ '2013.01.31 07:56', '2013.01.31 08:02', false, undefined ], +[ '2013.02.01 07:55', '2013.02.01 08:02', false, undefined ], +[ '2013.02.02 07:54', '2013.02.02 08:02', false, undefined ], "Variable times which moves over fix end time" for "sunrise-08:00": PASSED "Variable times which moves over fix end time" for "sunrise-07:58": PASSED "Variable times which moves over fix end time" for "sunrise-06:00": PASSED -"Variable times which moves over fix end time" for "sunrise-05:59": PASSED +"Variable times which moves over fix end time" for "sunrise-05:59": FAILED, bad duration(s): 158220000,0, expected 158160000,0, bad intervals: +[ '2013.01.26 00:00', '2013.01.26 05:59', false, undefined ], +[ '2013.01.26 08:01', '2013.01.27 05:59', false, undefined ], +[ '2013.01.27 08:00', '2013.01.28 00:00', false, undefined ], +expected: +[ '2013.01.26 00:00', '2013.01.26 05:59', false, undefined ], +[ '2013.01.26 08:02', '2013.01.27 05:59', false, undefined ], +[ '2013.01.27 08:00', '2013.01.28 00:00', false, undefined ], "Variable times which moves over fix end time" for "sunrise-06:00": PASSED "Variable times which moves over fix end time" for "sunrise-05:59": IGNORED, reason: not implemented yet "Variable times spanning midnight" for "sunset-sunrise": PASSED @@ -1364,9 +1385,9 @@ With warnings: "Based on real world example: Is processed right." for "Apr-Oct: Sa-Su 08:00-15:00, May-Sep: 00:00-24:00": PASSED "Based on real world example: Is processed right." for "Apr-Oct: Sa-Su 08:00-15:00; May-Sep: 00:00-24:00": PASSED "Real world example: Was not processed right." for "Mo-Fr 07:00-19:30; Sa-Su 08:00-19:30; 19:30-21:00 open "No new laundry loads in"; Nov Th[4] off; Dec 25 off": PASSED -An error occurred during evaluation of the value "Jan off; Feb off; Mar off; Apr Tu-Su 10:00-14:30, May Tu-Su 10:00-14:30; Jun Tu-Su 09:00-16:00; Jul Tu-Su 10:00-17:00; Aug Tu-Su 10:00-17:00; Sep Tu-Su 10:00-14:30; Oct Tu-Su 10:00-14:30 Nov off; Dec off". Please file a bug report or pull request: https://github.com/ypid/opening_hours.js. Bug in warning generation code which could not determine the exact position of the warning or error in value. +An error occurred during evaluation of the value "Jan off; Feb off; Mar off; Apr Tu-Su 10:00-14:30, May Tu-Su 10:00-14:30; Jun Tu-Su 09:00-16:00; Jul Tu-Su 10:00-17:00; Aug Tu-Su 10:00-17:00; Sep Tu-Su 10:00-14:30; Oct Tu-Su 10:00-14:30 Nov off; Dec off". Please file a bug report or pull request: https://github.com/opening-hours/opening_hours.js. Bug in warning generation code which could not determine the exact position of the warning or error in value. tokens[nrule][2] is undefined. This is ok if nrule is the last rule. -An error occurred during evaluation of the value "Jan off; Feb off; Mar off; Apr Tu-Su 10:00-14:30, May Tu-Su 10:00-14:30; Jun Tu-Su 09:00-16:00; Jul Tu-Su 10:00-17:00; Aug Tu-Su 10:00-17:00; Sep Tu-Su 10:00-14:30; Oct Tu-Su 10:00-14:30 Nov off; Dec off". Please file a bug report or pull request: https://github.com/ypid/opening_hours.js. Bug in warning generation code which could not determine the exact position of the warning or error in value. +An error occurred during evaluation of the value "Jan off; Feb off; Mar off; Apr Tu-Su 10:00-14:30, May Tu-Su 10:00-14:30; Jun Tu-Su 09:00-16:00; Jul Tu-Su 10:00-17:00; Aug Tu-Su 10:00-17:00; Sep Tu-Su 10:00-14:30; Oct Tu-Su 10:00-14:30 Nov off; Dec off". Please file a bug report or pull request: https://github.com/opening-hours/opening_hours.js. Bug in warning generation code which could not determine the exact position of the warning or error in value. tokens[nrule][2] is undefined. This is ok if nrule is the last rule. "Real world example: Was not processed right" for "Jan off; Feb off; Mar off; Apr Tu-Su 10:00-14:30, May Tu-Su 10:00-14:30; Jun Tu-Su 09:00-16:00; Jul Tu-Su 10:00-17:00; Aug Tu-Su 10:00-17:00; Sep Tu-Su 10:00-14:30; Oct Tu-Su 10:00-14:30 Nov off; Dec off": PASSED With warnings: @@ -1430,8 +1451,196 @@ With warnings: *Monday-Wednesday 07:00; Thursday,Friday 05:45; Monday[1] 07:30; school holidays Monday-Friday <--- (Please use the abbreviation "Fr" for "friday".) *Monday-Wednesday 07:00; Thursday,Friday 05:45; Monday[1] 07:30; school holidays Monday-Friday (sunrise+03:00); public holidays <--- (Please use notation "PH" for "public holidays".) "Points in time, extrem example useful for ComplexAlarm" for "Mo-We 07:00; Th,Fr 05:45; Mo[1] 07:30; SH Mo-Fr (sunrise+03:00); PH off": PASSED -"Points in time, extrem example useful for ComplexAlarm" for "Mo-We 07:00; Th 05:45; week 01-53/2 Fr 07:05; week 02-53/2 Fr 05:45; SH Mo-Fr (sunrise+03:00); PH off": PASSED -"Points in time, extrem example useful for ComplexAlarm" for "Mo-We 07:00; Th 05:45; week 01-53/2 Fr 07:05; week 02-53/2 Fr 05:45; SH Mo-Fr (sunrise+03:00); PH off; easter -2 days-easter +2 days off "My little break from work every year."; 2014 Sep 01-2014 Sep 07 off "My vacations …"": PASSED +"Points in time, extrem example useful for ComplexAlarm" for "Mo-We 07:00; Th 05:45; week 01-53/2 Fr 07:05; week 02-53/2 Fr 05:45; SH Mo-Fr (sunrise+03:00); PH off": FAILED, bad intervals: +[ '2014.08.25 09:27', '2014.08.25 09:28', false, 'Sommerferien' ], +[ '2014.08.26 09:28', '2014.08.26 09:29', false, 'Sommerferien' ], +[ '2014.08.27 09:30', '2014.08.27 09:31', false, 'Sommerferien' ], +[ '2014.08.28 09:31', '2014.08.28 09:32', false, 'Sommerferien' ], +[ '2014.08.29 09:33', '2014.08.29 09:34', false, 'Sommerferien' ], +[ '2014.09.01 09:37', '2014.09.01 09:38', false, 'Sommerferien' ], +[ '2014.09.02 09:39', '2014.09.02 09:40', false, 'Sommerferien' ], +[ '2014.09.03 09:40', '2014.09.03 09:41', false, 'Sommerferien' ], +[ '2014.09.04 09:41', '2014.09.04 09:42', false, 'Sommerferien' ], +[ '2014.09.05 09:43', '2014.09.05 09:44', false, 'Sommerferien' ], +[ '2014.09.08 09:47', '2014.09.08 09:48', false, 'Sommerferien' ], +[ '2014.09.09 09:49', '2014.09.09 09:50', false, 'Sommerferien' ], +[ '2014.09.10 09:50', '2014.09.10 09:51', false, 'Sommerferien' ], +[ '2014.09.11 09:52', '2014.09.11 09:53', false, 'Sommerferien' ], +[ '2014.09.12 09:53', '2014.09.12 09:54', false, 'Sommerferien' ], +[ '2014.09.15 07:00', '2014.09.15 07:01', false, undefined ], +[ '2014.09.16 07:00', '2014.09.16 07:01', false, undefined ], +[ '2014.09.17 07:00', '2014.09.17 07:01', false, undefined ], +[ '2014.09.18 05:45', '2014.09.18 05:46', false, undefined ], +[ '2014.09.19 05:45', '2014.09.19 05:46', false, undefined ], +[ '2014.09.22 07:00', '2014.09.22 07:01', false, undefined ], +[ '2014.09.23 07:00', '2014.09.23 07:01', false, undefined ], +[ '2014.09.24 07:00', '2014.09.24 07:01', false, undefined ], +[ '2014.09.25 05:45', '2014.09.25 05:46', false, undefined ], +[ '2014.09.26 07:05', '2014.09.26 07:06', false, undefined ], +[ '2014.09.29 07:00', '2014.09.29 07:01', false, undefined ], +[ '2014.09.30 07:00', '2014.09.30 07:01', false, undefined ], +[ '2014.10.01 07:00', '2014.10.01 07:01', false, undefined ], +[ '2014.10.02 05:45', '2014.10.02 05:46', false, undefined ], +[ '2014.10.06 07:00', '2014.10.06 07:01', false, undefined ], +[ '2014.10.07 07:00', '2014.10.07 07:01', false, undefined ], +[ '2014.10.08 07:00', '2014.10.08 07:01', false, undefined ], +[ '2014.10.09 05:45', '2014.10.09 05:46', false, undefined ], +[ '2014.10.10 07:05', '2014.10.10 07:06', false, undefined ], +[ '2014.10.13 07:00', '2014.10.13 07:01', false, undefined ], +[ '2014.10.14 07:00', '2014.10.14 07:01', false, undefined ], +[ '2014.10.15 07:00', '2014.10.15 07:01', false, undefined ], +[ '2014.10.16 05:45', '2014.10.16 05:46', false, undefined ], +[ '2014.10.17 05:45', '2014.10.17 05:46', false, undefined ], +[ '2014.10.20 07:00', '2014.10.20 07:01', false, undefined ], +[ '2014.10.21 07:00', '2014.10.21 07:01', false, undefined ], +[ '2014.10.22 07:00', '2014.10.22 07:01', false, undefined ], +[ '2014.10.23 05:45', '2014.10.23 05:46', false, undefined ], +[ '2014.10.24 07:05', '2014.10.24 07:06', false, undefined ], +[ '2014.10.27 10:01', '2014.10.27 10:02', false, 'Herbstferien' ], +[ '2014.10.28 10:03', '2014.10.28 10:04', false, 'Herbstferien' ], +[ '2014.10.29 10:05', '2014.10.29 10:06', false, 'Herbstferien' ], +[ '2014.10.30 10:06', '2014.10.30 10:07', false, 'Herbstferien' ], +[ '2014.10.31 05:45', '2014.10.31 05:46', false, undefined ], +expected: +[ '2014.08.25 09:27', '2014.08.25 09:28', false, 'Sommerferien' ], +[ '2014.08.26 09:28', '2014.08.26 09:29', false, 'Sommerferien' ], +[ '2014.08.27 09:30', '2014.08.27 09:31', false, 'Sommerferien' ], +[ '2014.08.28 09:31', '2014.08.28 09:32', false, 'Sommerferien' ], +[ '2014.08.29 09:33', '2014.08.29 09:34', false, 'Sommerferien' ], +[ '2014.09.01 09:37', '2014.09.01 09:38', false, 'Sommerferien' ], +[ '2014.09.02 09:39', '2014.09.02 09:40', false, 'Sommerferien' ], +[ '2014.09.03 09:40', '2014.09.03 09:41', false, 'Sommerferien' ], +[ '2014.09.04 09:42', '2014.09.04 09:43', false, 'Sommerferien' ], +[ '2014.09.05 09:43', '2014.09.05 09:44', false, 'Sommerferien' ], +[ '2014.09.08 09:47', '2014.09.08 09:48', false, 'Sommerferien' ], +[ '2014.09.09 09:49', '2014.09.09 09:50', false, 'Sommerferien' ], +[ '2014.09.10 09:50', '2014.09.10 09:51', false, 'Sommerferien' ], +[ '2014.09.11 09:52', '2014.09.11 09:53', false, 'Sommerferien' ], +[ '2014.09.12 09:53', '2014.09.12 09:54', false, 'Sommerferien' ], +[ '2014.09.15 07:00', '2014.09.15 07:01', false, undefined ], +[ '2014.09.16 07:00', '2014.09.16 07:01', false, undefined ], +[ '2014.09.17 07:00', '2014.09.17 07:01', false, undefined ], +[ '2014.09.18 05:45', '2014.09.18 05:46', false, undefined ], +[ '2014.09.19 05:45', '2014.09.19 05:46', false, undefined ], +[ '2014.09.22 07:00', '2014.09.22 07:01', false, undefined ], +[ '2014.09.23 07:00', '2014.09.23 07:01', false, undefined ], +[ '2014.09.24 07:00', '2014.09.24 07:01', false, undefined ], +[ '2014.09.25 05:45', '2014.09.25 05:46', false, undefined ], +[ '2014.09.26 07:05', '2014.09.26 07:06', false, undefined ], +[ '2014.09.29 07:00', '2014.09.29 07:01', false, undefined ], +[ '2014.09.30 07:00', '2014.09.30 07:01', false, undefined ], +[ '2014.10.01 07:00', '2014.10.01 07:01', false, undefined ], +[ '2014.10.02 05:45', '2014.10.02 05:46', false, undefined ], +[ '2014.10.06 07:00', '2014.10.06 07:01', false, undefined ], +[ '2014.10.07 07:00', '2014.10.07 07:01', false, undefined ], +[ '2014.10.08 07:00', '2014.10.08 07:01', false, undefined ], +[ '2014.10.09 05:45', '2014.10.09 05:46', false, undefined ], +[ '2014.10.10 07:05', '2014.10.10 07:06', false, undefined ], +[ '2014.10.13 07:00', '2014.10.13 07:01', false, undefined ], +[ '2014.10.14 07:00', '2014.10.14 07:01', false, undefined ], +[ '2014.10.15 07:00', '2014.10.15 07:01', false, undefined ], +[ '2014.10.16 05:45', '2014.10.16 05:46', false, undefined ], +[ '2014.10.17 05:45', '2014.10.17 05:46', false, undefined ], +[ '2014.10.20 07:00', '2014.10.20 07:01', false, undefined ], +[ '2014.10.21 07:00', '2014.10.21 07:01', false, undefined ], +[ '2014.10.22 07:00', '2014.10.22 07:01', false, undefined ], +[ '2014.10.23 05:45', '2014.10.23 05:46', false, undefined ], +[ '2014.10.24 07:05', '2014.10.24 07:06', false, undefined ], +[ '2014.10.27 10:02', '2014.10.27 10:03', false, 'Herbstferien' ], +[ '2014.10.28 10:03', '2014.10.28 10:04', false, 'Herbstferien' ], +[ '2014.10.29 10:05', '2014.10.29 10:06', false, 'Herbstferien' ], +[ '2014.10.30 10:06', '2014.10.30 10:07', false, 'Herbstferien' ], +[ '2014.10.31 05:45', '2014.10.31 05:46', false, undefined ], +"Points in time, extrem example useful for ComplexAlarm" for "Mo-We 07:00; Th 05:45; week 01-53/2 Fr 07:05; week 02-53/2 Fr 05:45; SH Mo-Fr (sunrise+03:00); PH off; easter -2 days-easter +2 days off "My little break from work every year."; 2014 Sep 01-2014 Sep 07 off "My vacations …"": FAILED, bad intervals: +[ '2014.08.25 09:27', '2014.08.25 09:28', false, 'Sommerferien' ], +[ '2014.08.26 09:28', '2014.08.26 09:29', false, 'Sommerferien' ], +[ '2014.08.27 09:30', '2014.08.27 09:31', false, 'Sommerferien' ], +[ '2014.08.28 09:31', '2014.08.28 09:32', false, 'Sommerferien' ], +[ '2014.08.29 09:33', '2014.08.29 09:34', false, 'Sommerferien' ], +[ '2014.09.08 09:47', '2014.09.08 09:48', false, 'Sommerferien' ], +[ '2014.09.09 09:49', '2014.09.09 09:50', false, 'Sommerferien' ], +[ '2014.09.10 09:50', '2014.09.10 09:51', false, 'Sommerferien' ], +[ '2014.09.11 09:52', '2014.09.11 09:53', false, 'Sommerferien' ], +[ '2014.09.12 09:53', '2014.09.12 09:54', false, 'Sommerferien' ], +[ '2014.09.15 07:00', '2014.09.15 07:01', false, undefined ], +[ '2014.09.16 07:00', '2014.09.16 07:01', false, undefined ], +[ '2014.09.17 07:00', '2014.09.17 07:01', false, undefined ], +[ '2014.09.18 05:45', '2014.09.18 05:46', false, undefined ], +[ '2014.09.19 05:45', '2014.09.19 05:46', false, undefined ], +[ '2014.09.22 07:00', '2014.09.22 07:01', false, undefined ], +[ '2014.09.23 07:00', '2014.09.23 07:01', false, undefined ], +[ '2014.09.24 07:00', '2014.09.24 07:01', false, undefined ], +[ '2014.09.25 05:45', '2014.09.25 05:46', false, undefined ], +[ '2014.09.26 07:05', '2014.09.26 07:06', false, undefined ], +[ '2014.09.29 07:00', '2014.09.29 07:01', false, undefined ], +[ '2014.09.30 07:00', '2014.09.30 07:01', false, undefined ], +[ '2014.10.01 07:00', '2014.10.01 07:01', false, undefined ], +[ '2014.10.02 05:45', '2014.10.02 05:46', false, undefined ], +[ '2014.10.06 07:00', '2014.10.06 07:01', false, undefined ], +[ '2014.10.07 07:00', '2014.10.07 07:01', false, undefined ], +[ '2014.10.08 07:00', '2014.10.08 07:01', false, undefined ], +[ '2014.10.09 05:45', '2014.10.09 05:46', false, undefined ], +[ '2014.10.10 07:05', '2014.10.10 07:06', false, undefined ], +[ '2014.10.13 07:00', '2014.10.13 07:01', false, undefined ], +[ '2014.10.14 07:00', '2014.10.14 07:01', false, undefined ], +[ '2014.10.15 07:00', '2014.10.15 07:01', false, undefined ], +[ '2014.10.16 05:45', '2014.10.16 05:46', false, undefined ], +[ '2014.10.17 05:45', '2014.10.17 05:46', false, undefined ], +[ '2014.10.20 07:00', '2014.10.20 07:01', false, undefined ], +[ '2014.10.21 07:00', '2014.10.21 07:01', false, undefined ], +[ '2014.10.22 07:00', '2014.10.22 07:01', false, undefined ], +[ '2014.10.23 05:45', '2014.10.23 05:46', false, undefined ], +[ '2014.10.24 07:05', '2014.10.24 07:06', false, undefined ], +[ '2014.10.27 10:01', '2014.10.27 10:02', false, 'Herbstferien' ], +[ '2014.10.28 10:03', '2014.10.28 10:04', false, 'Herbstferien' ], +[ '2014.10.29 10:05', '2014.10.29 10:06', false, 'Herbstferien' ], +[ '2014.10.30 10:06', '2014.10.30 10:07', false, 'Herbstferien' ], +[ '2014.10.31 05:45', '2014.10.31 05:46', false, undefined ], +expected: +[ '2014.08.25 09:27', '2014.08.25 09:28', false, 'Sommerferien' ], +[ '2014.08.26 09:28', '2014.08.26 09:29', false, 'Sommerferien' ], +[ '2014.08.27 09:30', '2014.08.27 09:31', false, 'Sommerferien' ], +[ '2014.08.28 09:31', '2014.08.28 09:32', false, 'Sommerferien' ], +[ '2014.08.29 09:33', '2014.08.29 09:34', false, 'Sommerferien' ], +[ '2014.09.08 09:47', '2014.09.08 09:48', false, 'Sommerferien' ], +[ '2014.09.09 09:49', '2014.09.09 09:50', false, 'Sommerferien' ], +[ '2014.09.10 09:50', '2014.09.10 09:51', false, 'Sommerferien' ], +[ '2014.09.11 09:52', '2014.09.11 09:53', false, 'Sommerferien' ], +[ '2014.09.12 09:53', '2014.09.12 09:54', false, 'Sommerferien' ], +[ '2014.09.15 07:00', '2014.09.15 07:01', false, undefined ], +[ '2014.09.16 07:00', '2014.09.16 07:01', false, undefined ], +[ '2014.09.17 07:00', '2014.09.17 07:01', false, undefined ], +[ '2014.09.18 05:45', '2014.09.18 05:46', false, undefined ], +[ '2014.09.19 05:45', '2014.09.19 05:46', false, undefined ], +[ '2014.09.22 07:00', '2014.09.22 07:01', false, undefined ], +[ '2014.09.23 07:00', '2014.09.23 07:01', false, undefined ], +[ '2014.09.24 07:00', '2014.09.24 07:01', false, undefined ], +[ '2014.09.25 05:45', '2014.09.25 05:46', false, undefined ], +[ '2014.09.26 07:05', '2014.09.26 07:06', false, undefined ], +[ '2014.09.29 07:00', '2014.09.29 07:01', false, undefined ], +[ '2014.09.30 07:00', '2014.09.30 07:01', false, undefined ], +[ '2014.10.01 07:00', '2014.10.01 07:01', false, undefined ], +[ '2014.10.02 05:45', '2014.10.02 05:46', false, undefined ], +[ '2014.10.06 07:00', '2014.10.06 07:01', false, undefined ], +[ '2014.10.07 07:00', '2014.10.07 07:01', false, undefined ], +[ '2014.10.08 07:00', '2014.10.08 07:01', false, undefined ], +[ '2014.10.09 05:45', '2014.10.09 05:46', false, undefined ], +[ '2014.10.10 07:05', '2014.10.10 07:06', false, undefined ], +[ '2014.10.13 07:00', '2014.10.13 07:01', false, undefined ], +[ '2014.10.14 07:00', '2014.10.14 07:01', false, undefined ], +[ '2014.10.15 07:00', '2014.10.15 07:01', false, undefined ], +[ '2014.10.16 05:45', '2014.10.16 05:46', false, undefined ], +[ '2014.10.17 05:45', '2014.10.17 05:46', false, undefined ], +[ '2014.10.20 07:00', '2014.10.20 07:01', false, undefined ], +[ '2014.10.21 07:00', '2014.10.21 07:01', false, undefined ], +[ '2014.10.22 07:00', '2014.10.22 07:01', false, undefined ], +[ '2014.10.23 05:45', '2014.10.23 05:46', false, undefined ], +[ '2014.10.24 07:05', '2014.10.24 07:06', false, undefined ], +[ '2014.10.27 10:02', '2014.10.27 10:03', false, 'Herbstferien' ], +[ '2014.10.28 10:03', '2014.10.28 10:04', false, 'Herbstferien' ], +[ '2014.10.29 10:05', '2014.10.29 10:06', false, 'Herbstferien' ], +[ '2014.10.30 10:06', '2014.10.30 10:07', false, 'Herbstferien' ], +[ '2014.10.31 05:45', '2014.10.31 05:46', false, undefined ], "Points in time, period times" for "Mo-Fr 10:00-16:00/01:30": PASSED "Points in time, period times" for "Mo-Fr 10:00-16:00/90": PASSED "Points in time, period times" for "Mo-Fr 10:00-16:00/90; Sa off "testing at end for parser"": PASSED @@ -2246,13 +2455,13 @@ sunrise-( <--- (Time range does not continue as expected) "Time range does not continue as expected for mode === 2." for "sunrise-sunset,(; 00:23-00:42 unknown "warning at correct position?"": PASSED sunrise-sunset,( <--- (Missing variable time (e.g. sunrise) after: "(") -An error occurred during evaluation of the value "Mo-Fr 10:00-20:00; PH off". Please submit a pull request: https://github.com/ypid/opening_hours.js. There are no holidays (PH) defined for country none. +An error occurred during evaluation of the value "Mo-Fr 10:00-20:00; PH off". Please submit a pull request: https://github.com/opening-hours/opening_hours.js. There are no holidays (PH) defined for country none. "PH with non-existing address." for "Mo-Fr 10:00-20:00; PH off": PASSED -An error occurred during evaluation of the value "Mo-Fr 10:00-20:00; PH off". Please submit a pull request: https://github.com/ypid/opening_hours.js. There are no holidays (PH) defined for country none. +An error occurred during evaluation of the value "Mo-Fr 10:00-20:00; PH off". Please submit a pull request: https://github.com/opening-hours/opening_hours.js. There are no holidays (PH) defined for country none. -An error occurred during evaluation of the value "Mo-Fr 10:00-20:00; SH off". Please submit a pull request: https://github.com/ypid/opening_hours.js. There are no holidays (SH) defined for country none. +An error occurred during evaluation of the value "Mo-Fr 10:00-20:00; SH off". Please submit a pull request: https://github.com/opening-hours/opening_hours.js. There are no holidays (SH) defined for country none. "SH with non-existing address." for "Mo-Fr 10:00-20:00; SH off": PASSED -An error occurred during evaluation of the value "Mo-Fr 10:00-20:00; SH off". Please submit a pull request: https://github.com/ypid/opening_hours.js. There are no holidays (SH) defined for country none. +An error occurred during evaluation of the value "Mo-Fr 10:00-20:00; SH off". Please submit a pull request: https://github.com/opening-hours/opening_hours.js. There are no holidays (SH) defined for country none. "Trying to trigger "Missing minutes in time range after" for mode === 0." for "Mon-Sun 14-": PASSED Mon-Sun 14- <--- (Missing time separator in time range after: "number") @@ -2308,10 +2517,10 @@ Su 7:30,10 <--- (Missing time separator in time range after: "number") "Trying to trigger "Missing time separator in time range after" for mode === 2." for "Su 7:30,10i00,22:00": PASSED Su 7:30,10i <--- (Missing time separator in time range after: "number") -"Wrong constructor call should throw an error: nominatimJSON: string" for "1": PASSED +"Wrong constructor call should throw an error: nominatim_data: string" for "1": PASSED The value (first parameter) is not a string. -"Wrong constructor call should throw an error: nominatimJSON: string" for "Mo-Fr 08:00-16:00": PASSED +"Wrong constructor call should throw an error: nominatim_data: string" for "Mo-Fr 08:00-16:00": PASSED The nominatim_object parameter is of unknown type. Given string, expected object. "Wrong constructor call should throw an error: "string"" for "Mo-Fr 12:00-18:00; We off; Sa,PH 12:00-17:00; Th[3],Th[-1] off": PASSED diff --git a/test.js b/test.js index e54ca97a..7197caba 100755 --- a/test.js +++ b/test.js @@ -29,7 +29,10 @@ var opening_hours = require('./' + argv['library-file']); var colors = require('colors'); var sprintf = require('sprintf-js').sprintf; var timekeeper = require('timekeeper'); -var moment = require('moment'); +var moment = require('moment'); +var glob = require('glob'); +var yaml = require('js-yaml'); +var fs = require('fs'); /* }}} */ colors.setTheme({ @@ -53,21 +56,35 @@ var test = new opening_hours_test(); // test.extensive_testing = true; // FIXME: Do it. -// nominatimJSON {{{ +/* }}} */ -var nominatim_for_loc = require('./js/nominatim_definitions.js').for_loc; +// Nominatim data {{{ -/* Used for sunrise, sunset … and PH,SH. - * Do not define new nominatim responses below and instead define them in - * ./js/nominatim_definitions.js - */ +let nominatim_by_loc = {}; +for (let nominatim_file of glob.sync("holidays/nominatim_cache/*.yaml")) { + let country_state = nominatim_file.match(/^.*\/([^/]*)\.yaml$/)[1]; + nominatim_by_loc[country_state] = yaml.safeLoad(fs.readFileSync(nominatim_file)); +} -/* Defaults {{{ */ -// https://nominatim.openstreetmap.org/reverse?format=json&lat=49.5487429714954&lon=9.81602098644987&zoom=18&addressdetails=1 -var nominatimTestJSON = {"place_id":"44651229","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"36248375","lat":"49.5400039","lon":"9.7937133","display_name":"K 2847, Lauda-K\u00f6nigshofen, Main-Tauber-Kreis, Regierungsbezirk Stuttgart, Baden-W\u00fcrttemberg, Germany, European Union","address":{"road":"K 2847","city":"Lauda-K\u00f6nigshofen","county":"Main-Tauber-Kreis","state_district":"Regierungsbezirk Stuttgart","state":"Baden-W\u00fcrttemberg","country":"Germany","country_code":"de","continent":"European Union"}}; +let nominatim_default = nominatim_by_loc.de_bw; // https://nominatim.openstreetmap.org/reverse?format=json&lat=60.5487429714954&lon=9.81602098644987&zoom=18&addressdetails=1 -var nominatimTestJSON_sunrise_below_default = {"place_id":"71977948","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"118145917","lat":"60.5467949","lon":"9.8269589","display_name":"243, Ringerike, Buskerud, Norway","address":{"road":"243","county":"Ringerike","state":"Buskerud","country":"Norway","country_code":"no"}}; +var nominatim_sunrise_below = { + "place_id": "71977948", + "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright", + "osm_type": "way", + "osm_id": "118145917", + "lat": "60.5467949", + "lon": "9.8269589", + "display_name": "243, Ringerike, Buskerud, Norway", + "address": { + "road": "243", + "county": "Ringerike", + "state": "Buskerud", + "country": "Norway", + "country_code": "no" + } +}; // https://nominatim.openstreetmap.org/reverse?format=json&lat=27.567&lon=-71.093&zoom=18&addressdetails=1 // Actual response: {"error":"Unable to geocode"} @@ -87,21 +104,19 @@ var nominatim_no_valid_address = { "country_code": "none" } }; -/* }}} */ -/* Russia {{{ */ // https://nominatim.openstreetmap.org/reverse?format=json&lat=59.9179&lon=30.3058&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_sanktpeterburg = { +nominatim_by_loc.ru_state_unknown = { "address": { - "city": "Saint Petersburg", + // "city": "Saint Petersburg", "country": "Russian Federation", "country_code": "ru", - "house_number": "126", - "postcode": "190000", - "road": "Fontanka River Embankment", - "state": "Saint Petersburg", - "state_district": "\u0410\u0434\u043c\u0438\u0440\u0430\u043b\u0442\u0435\u0439\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d", - "suburb": "Kolomna" + // "house_number": "126", + // "postcode": "190000", + // "road": "Fontanka River Embankment", + // "state": "Saint Petersburg", + // "state_district": "\u0410\u0434\u043c\u0438\u0440\u0430\u043b\u0442\u0435\u0439\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d", + // "suburb": "Kolomna" }, "display_name": "126, Fontanka River Embankment, Kolomna, Saint Petersburg, \u0410\u0434\u043c\u0438\u0440\u0430\u043b\u0442\u0435\u0439\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d, Saint Petersburg, Northwestern Federal District, 190000, Russian Federation", "lat": "59.9180615", @@ -111,48 +126,8 @@ var nominatimTestJSON_russia_sanktpeterburg = { "osm_type": "relation", "place_id": "158850652" }; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=55.7780&lon=49.1303&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_tatarstan = {"place_id":"33377476","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"node","osm_id":"2783648099","lat":"55.7779748","lon":"49.1296892","display_name":"Cinema Cafe, 6, Spartakovskaya Street, \u041a\u0430\u043b\u0443\u0433\u0430, \u0412\u0430\u0445\u0438\u0442\u043e\u0432\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d, \u041a\u0430\u0437\u0430\u043d\u044c, \u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u043e\u043a\u0440\u0443\u0433 \u041a\u0430\u0437\u0430\u043d\u044c, Tatarstan, Volga Federal District, 420106, Russian Federation","address":{"cafe":"Cinema Cafe","house_number":"6","road":"Spartakovskaya Street","suburb":"\u041a\u0430\u043b\u0443\u0433\u0430","city_district":"\u0412\u0430\u0445\u0438\u0442\u043e\u0432\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d","city":"\u041a\u0430\u0437\u0430\u043d\u044c","county":"\u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u043e\u043a\u0440\u0443\u0433 \u041a\u0430\u0437\u0430\u043d\u044c","state":"Tatarstan","postcode":"420106","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=54.1264&lon=56.5797&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_bashkortostan = {"place_id":"4367634","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"node","osm_id":"489344251","lat":"54.190107","lon":"56.5377028","display_name":"\u041d\u043e\u0432\u043e\u0437\u0438\u0440\u0438\u043a\u043e\u0432\u043e, \u0413\u0430\u0444\u0443\u0440\u0438\u0439\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d, Bashkortostan, Volga Federal District, Russian Federation","address":{"hamlet":"\u041d\u043e\u0432\u043e\u0437\u0438\u0440\u0438\u043a\u043e\u0432\u043e","county":"\u0413\u0430\u0444\u0443\u0440\u0438\u0439\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d","state":"Bashkortostan","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=55.4871&lon=47.1659&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_chuvash = {"place_id":"92041184","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"115006808","lat":"55.5013946","lon":"47.165831","display_name":"97\u041a-021, \u0410\u0447\u0430\u043a\u0430\u0441\u044b, \u041a\u0430\u043d\u0430\u0448\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d, Chuvashia, Volga Federal District, Russian Federation","address":{"road":"97\u041a-021","village":"\u0410\u0447\u0430\u043a\u0430\u0441\u044b","county":"\u041a\u0430\u043d\u0430\u0448\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d","state":"Chuvashia","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=62.1010&lon=129.7176&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_sakha = {"place_id":"157409650","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"297831427","lat":"62.10115345","lon":"129.71764735","display_name":"17, \u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0443\u043b\u043e\u043a, \u0440\u0430\u0439\u043e\u043d \u041f\u043b\u0435\u043c\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, Yakutsk, \u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u043e\u043a\u0440\u0443\u0433 \u042f\u043a\u0443\u0442\u0441\u043a, Sakha Republic, Far Eastern Federal District, 677901, Russian Federation","address":{"house_number":"17","road":"\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0443\u043b\u043e\u043a","suburb":"\u0440\u0430\u0439\u043e\u043d \u041f\u043b\u0435\u043c\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435","city":"Yakutsk","county":"\u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u043e\u043a\u0440\u0443\u0433 \u042f\u043a\u0443\u0442\u0441\u043a","state":"Sakha Republic","postcode":"677901","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=46.524&lon=44.731&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_kalmykia = {"place_id":"155691118","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"292575902","lat":"46.58413215","lon":"44.778536225","display_name":"\u041c\u0430\u0439\u0441\u043a\u0438\u0439, \u0426\u0435\u043b\u0438\u043d\u043d\u044b\u0439 \u0440\u0430\u0439\u043e\u043d, Republic of Kalmykia, South federal district, Russian Federation","address":{"hamlet":"\u041c\u0430\u0439\u0441\u043a\u0438\u0439","county":"\u0426\u0435\u043b\u0438\u043d\u043d\u044b\u0439 \u0440\u0430\u0439\u043e\u043d","state":"Republic of Kalmykia","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=52.014&lon=109.366&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_buryatia = {"place_id":"158771291","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"195223","lat":"52.4290635","lon":"109.517969733203","display_name":"Khorinsky Rayon, Buryatia, Siberian Federal District, Russian Federation","address":{"county":"Khorinsky Rayon","state":"Buryatia","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=63.832&lon=33.626&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_karelia = {"place_id":"158846852","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"1020571","lat":"63.94629385","lon":"33.5193580207717","display_name":"\u0427\u0435\u0440\u043d\u043e\u043f\u043e\u0440\u043e\u0436\u0441\u043a\u043e\u0435 \u0441\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043f\u043e\u0441\u0435\u043b\u0435\u043d\u0438\u0435, \u0421\u0435\u0433\u0435\u0436\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d, Republic of Karelia, Northwestern Federal District, Russian Federation","address":{"city":"\u0427\u0435\u0440\u043d\u043e\u043f\u043e\u0440\u043e\u0436\u0441\u043a\u043e\u0435 \u0441\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043f\u043e\u0441\u0435\u043b\u0435\u043d\u0438\u0435","county":"\u0421\u0435\u0433\u0435\u0436\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d","state":"Republic of Karelia","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=56.8642&lon=53.2054&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_udmurtia = {"place_id":"74363539","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"59171598","lat":"56.86426315","lon":"53.2058149501383","display_name":"390, \u0443\u043b\u0438\u0446\u0430 \u041a\u0430\u0440\u043b\u0430 \u041c\u0430\u0440\u043a\u0441\u0430, \u041e\u043a\u0442\u044f\u0431\u0440\u044c\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d, Izhevsk, \u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u043e\u043a\u0440\u0443\u0433 \u0418\u0436\u0435\u0432\u0441\u043a, \u0423\u0434\u043c\u0443\u0440\u0442\u0441\u043a\u0430\u044f \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0430, Volga Federal District, 426008, Russian Federation","address":{"house_number":"390","road":"\u0443\u043b\u0438\u0446\u0430 \u041a\u0430\u0440\u043b\u0430 \u041c\u0430\u0440\u043a\u0441\u0430","city_district":"\u041e\u043a\u0442\u044f\u0431\u0440\u044c\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d","city":"Izhevsk","county":"\u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u043e\u043a\u0440\u0443\u0433 \u0418\u0436\u0435\u0432\u0441\u043a","state":"\u0423\u0434\u043c\u0443\u0440\u0442\u0441\u043a\u0430\u044f \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0430","postcode":"426008","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=44.60627&lon=40.10432&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_adygea = {"place_id":"117083297","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"178119466","lat":"44.60635535","lon":"40.103552511385","display_name":"\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0433.\u041c\u0430\u0439\u043a\u043e\u043f\u0430, 21, \u041a\u0440\u0430\u0441\u043d\u043e\u043e\u043a\u0442\u044f\u0431\u0440\u044c\u0441\u043a\u0430\u044f \u0443\u043b\u0438\u0446\u0430, Maykop, \u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u043e\u043a\u0440\u0443\u0433 \u041c\u0430\u0439\u043a\u043e\u043f, Adygea, South federal district, 385006, Russian Federation","address":{"townhall":"\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0433.\u041c\u0430\u0439\u043a\u043e\u043f\u0430","house_number":"21","road":"\u041a\u0440\u0430\u0441\u043d\u043e\u043e\u043a\u0442\u044f\u0431\u0440\u044c\u0441\u043a\u0430\u044f \u0443\u043b\u0438\u0446\u0430","city":"Maykop","county":"\u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u043e\u043a\u0440\u0443\u0433 \u041c\u0430\u0439\u043a\u043e\u043f","state":"Adygea","postcode":"385006","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=43.118&lon=46.959&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_dagestan = {"place_id":"8585510","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"node","osm_id":"915341178","lat":"43.1134014","lon":"47.0808948","display_name":"\u0423\u0447\u043a\u0435\u043d\u0442, \u041a\u0443\u043c\u0442\u043e\u0440\u043a\u0430\u043b\u0438\u043d\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d, Republic of Dagestan, North Caucasus federal district, Russian Federation","address":{"village":"\u0423\u0447\u043a\u0435\u043d\u0442","county":"\u041a\u0443\u043c\u0442\u043e\u0440\u043a\u0430\u043b\u0438\u043d\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d","state":"Republic of Dagestan","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=43.1171&lon=44.8626&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_ingushetia = {"place_id":"156030007","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"293569945","lat":"43.1456795","lon":"44.8365875","display_name":"P 721, \u0441\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043f\u043e\u0441\u0435\u043b\u0435\u043d\u0438\u0435 \u0410\u043b\u0438-\u042e\u0440\u0442, \u041d\u0430\u0437\u0440\u0430\u043d\u043e\u0432\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d, Ingushetia, North Caucasus federal district, 386125, Russian Federation","address":{"road":"P 721","city":"\u0441\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043f\u043e\u0441\u0435\u043b\u0435\u043d\u0438\u0435 \u0410\u043b\u0438-\u042e\u0440\u0442","county":"\u041d\u0430\u0437\u0440\u0430\u043d\u043e\u0432\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d","state":"Ingushetia","postcode":"386125","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=43.7916&lon=41.7268&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_karachayCherkess = {"place_id":"82077979","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"85989954","lat":"43.8052673","lon":"41.7291051","display_name":"\u041a\u0440\u0430\u0441\u043d\u044b\u0439 \u041e\u043a\u0442\u044f\u0431\u0440\u044c-\u0425\u0430\u0441\u0430\u0443\u0442 \u0413\u0440\u0435\u0447\u0435\u0441\u043a\u043e\u0435, \u0417\u0435\u043b\u0435\u043d\u0447\u0443\u043a\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d, \u041a\u0430\u0440\u0430\u0447\u0430\u0435\u0432\u043e-\u0427\u0435\u0440\u043a\u0435\u0441\u0441\u043a\u0430\u044f \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0430, North Caucasus federal district, Russian Federation","address":{"road":"\u041a\u0440\u0430\u0441\u043d\u044b\u0439 \u041e\u043a\u0442\u044f\u0431\u0440\u044c-\u0425\u0430\u0441\u0430\u0443\u0442 \u0413\u0440\u0435\u0447\u0435\u0441\u043a\u043e\u0435","county":"\u0417\u0435\u043b\u0435\u043d\u0447\u0443\u043a\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d","state":"\u041a\u0430\u0440\u0430\u0447\u0430\u0435\u0432\u043e-\u0427\u0435\u0440\u043a\u0435\u0441\u0441\u043a\u0430\u044f \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0430","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=43.451&lon=45.700&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_chechnya = {"place_id":"159190811","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"3888369","lat":"43.35498065","lon":"45.7216713693354","display_name":"\u041b\u0435\u043d\u0438\u043d\u0441\u043a\u0438\u0439, Grozny, \u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u043e\u043a\u0440\u0443\u0433 \u0413\u0440\u043e\u0437\u043d\u044b\u0439, Chechen Republic, North Caucasus federal district, Russian Federation","address":{"city_district":"\u041b\u0435\u043d\u0438\u043d\u0441\u043a\u0438\u0439","city":"Grozny","county":"\u0433\u043e\u0440\u043e\u0434\u0441\u043a\u043e\u0439 \u043e\u043a\u0440\u0443\u0433 \u0413\u0440\u043e\u0437\u043d\u044b\u0439","state":"Chechen Republic","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=43.497&lon=43.423&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_kabardinoBalkaria = {"place_id":"12000590","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"node","osm_id":"1176698285","lat":"43.5613295","lon":"43.4302516","display_name":"\u041b\u0435\u0447\u0438\u043d\u043a\u0430\u0439, \u0427\u0435\u0433\u0435\u043c\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d, \u041a\u0430\u0431\u0430\u0440\u0434\u0438\u043d\u043e-\u0411\u0430\u043b\u043a\u0430\u0440\u0441\u043a\u0430\u044f \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0430, North Caucasus federal district, Russian Federation","address":{"village":"\u041b\u0435\u0447\u0438\u043d\u043a\u0430\u0439","county":"\u0427\u0435\u0433\u0435\u043c\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d","state":"\u041a\u0430\u0431\u0430\u0440\u0434\u0438\u043d\u043e-\u0411\u0430\u043b\u043a\u0430\u0440\u0441\u043a\u0430\u044f \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0430","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=50.900&lon=86.899&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_altai = {"place_id":"158766852","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"192546","lat":"50.74112365","lon":"86.3687137822935","display_name":"Ongudaysky Rayon, Altai Republic, Siberian Federal District, Russian Federation","address":{"county":"Ongudaysky Rayon","state":"Altai Republic","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=51.781&lon=94.033&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_tyva = {"place_id":"158765550","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"190766","lat":"52.31183635","lon":"94.1400217560473","display_name":"Piy-Khemsky Kozhuun, Tuva, Siberian Federal District, Russian Federation","address":{"county":"Piy-Khemsky Kozhuun","state":"Tuva","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=51.335&lon=46.668&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_saratov = {"place_id":"63722839","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"31715230","lat":"51.2934885","lon":"46.6636942","display_name":"E 38, \u0421\u043e\u0432\u0435\u0442\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d, Saratov Oblast, Volga Federal District, Russian Federation","address":{"road":"E 38","county":"\u0421\u043e\u0432\u0435\u0442\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d","state":"Saratov Oblast","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=52.952&lon=33.283&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_bryansk = {"place_id":"121844937","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"190394567","lat":"52.9876239","lon":"33.2285656","display_name":"\u00ab\u0411\u0440\u044f\u043d\u0441\u043a \u2014 \u041d\u043e\u0432\u043e\u0437\u044b\u0431\u043a\u043e\u0432\u00bb \u2014 \u041c\u0433\u043b\u0438\u043d, \u0411\u0435\u0440\u0451\u0437\u043e\u0432\u043a\u0430, \u041f\u043e\u0447\u0435\u043f\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d, Bryansk Oblast, Central Federal District, Russian Federation","address":{"road":"\u00ab\u0411\u0440\u044f\u043d\u0441\u043a \u2014 \u041d\u043e\u0432\u043e\u0437\u044b\u0431\u043a\u043e\u0432\u00bb \u2014 \u041c\u0433\u043b\u0438\u043d","hamlet":"\u0411\u0435\u0440\u0451\u0437\u043e\u0432\u043a\u0430","county":"\u041f\u043e\u0447\u0435\u043f\u0441\u043a\u0438\u0439 \u0440\u0430\u0439\u043e\u043d","state":"Bryansk Oblast","country":"Russian Federation","country_code":"ru"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=64.191&lon=55.826&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_russia_komi = {"place_id":"158847082","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"1082933","lat":"65.0204625","lon":"57.3740830196108","display_name":"\u0440\u0430\u0439\u043e\u043d \u041f\u0435\u0447\u043e\u0440\u0430, Komi Republic, Northwestern Federal District, Russian Federation","address":{"county":"\u0440\u0430\u0439\u043e\u043d \u041f\u0435\u0447\u043e\u0440\u0430","state":"Komi Republic","country":"Russian Federation","country_code":"ru"}}; -/* }}} */ -/* USA {{{ */ -var nominatimTestJSON_usa_state_unknown = { +nominatim_by_loc.us_state_unknown = { "address": { "country": "United States of America", "country_code": "us", @@ -160,7 +135,7 @@ var nominatimTestJSON_usa_state_unknown = { // "county": "District of Columbia", // "information": "White House Visitor Center", // "neighbourhood": "Franklin McPherson Square", - "postcode": "20500", + // "postcode": "20500", // "road": "Ellipse Road Northwest", // "suburb": "Southwest Waterfront" }, @@ -172,198 +147,7 @@ var nominatimTestJSON_usa_state_unknown = { "osm_type": "node", "place_id": "25998054" }; -/* Washington DC {{{ */ -// https://nominatim.openstreetmap.org/reverse?format=json&lat=38.8953&lon=-77.0356&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_washingtondc = { - "address": { - // "city": "Washington", - "country": "United States of America", - "country_code": "us", - "county": "District of Columbia", - "information": "White House Visitor Center", - "neighbourhood": "Franklin McPherson Square", - "postcode": "20500", - "road": "Ellipse Road Northwest", - "suburb": "Southwest Waterfront" - }, - "display_name": "White House Visitor Center, Ellipse Road Northwest, Franklin McPherson Square, Southwest Waterfront, Washington, District of Columbia, 20500, United States of America", - "lat": "38.895048", - "licence": "Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright", - "lon": "-77.035046", - "osm_id": "2525694724", - "osm_type": "node", - "place_id": "25998054" -}; -/* }}} */ -/* Alabama {{{ */ -// https://nominatim.openstreetmap.org/reverse?format=json&lat=32.3673&lon=-86.2983&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_alabama = { - "address": { - "city": "Montgomery", - "country": "United States of America", - "country_code": "us", - "county": "Montgomery County", - "postcode": "36104", - "road": "Genetta Court", - "state": "Alabama" - }, - "display_name": "Genetta Court, Montgomery, Montgomery County, Alabama, 36104, United States of America", - "lat": "32.366649", - "licence": "Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright", - "lon": "-86.2990459", - "osm_id": "7928836", - "osm_type": "way", - "place_id": "49048248" -}; -/* }}} */ -// https://nominatim.openstreetmap.org/reverse?format=json&lat=64.5082&lon=-165.4066&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_alaska={"place_id":"49689315","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"8984498","lat":"64.5093904","lon":"-165.4064219","display_name":"North Star Assoc Access Road, Nome, Alaska, 99762, United States of America","address":{"road":"North Star Assoc Access Road","city":"Nome","county":"Nome","state":"Alaska","postcode":"99762","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=34.9378&lon=-109.7565&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_arizona={"place_id":"119968886","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"284558228","lat":"34.9381065","lon":"-109.7597016","display_name":"Blue Mesa Trail, Apache County, Arizona, United States of America","address":{"footway":"Blue Mesa Trail","county":"Apache County","state":"Arizona","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=34.74610&lon=-92.29054&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_arkansas={"place_id":"52473261","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"12933666","lat":"34.746454","lon":"-92.2903549","display_name":"Capitol Mall, Little Rock, Pulaski County, Arkansas, 72201, United States of America","address":{"road":"Capitol Mall","city":"Little Rock","county":"Pulaski County","state":"Arkansas","postcode":"72201","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=40.8001&lon=-124.1698&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_california={"place_id":"15825908","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"node","osm_id":"1491131029","lat":"40.7997997","lon":"-124.1704456","display_name":"Sole Savers Used Cars, 7th Street, Eureka, Humboldt County, California, 95501, United States of America","address":{"car":"Sole Savers Used Cars","road":"7th Street","city":"Eureka","county":"Humboldt County","state":"California","postcode":"95501","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=39.1804&lon=-106.8218&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_colorado={"place_id":"121524489","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"292950875","lat":"39.179721","lon":"-106.8236546","display_name":"West Side, Aspen, Pitkin County, Colorado, 81611, United States of America","address":{"path":"West Side","city":"Aspen","county":"Pitkin County","state":"Colorado","postcode":"81611","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=41.9111&lon=-72.16014&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_connecticut={"place_id":"21360915","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"node","osm_id":"2164630561","lat":"41.9112481","lon":"-72.1601503","display_name":"Pixi Falls, Nipmuck Trail, Westford, Windham County, Connecticut, 06278, United States of America","address":{"viewpoint":"Pixi Falls","footway":"Nipmuck Trail","hamlet":"Westford","county":"Windham County","state":"Connecticut","postcode":"06278","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=38.7113&lon=-75.0978&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_delaware={"place_id":"66739225","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"47999971","lat":"38.710581","lon":"-75.0967069","display_name":"Road 273C, Phil Mar Estates, Sussex County, Delaware, 19971, United States of America","address":{"road":"Road 273C","hamlet":"Phil Mar Estates","county":"Sussex County","state":"Delaware","postcode":"19971","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=25.7720&lon=-80.1324&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_florida={"place_id":"116692522","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"266382359","lat":"25.7718665","lon":"-80.1312973","display_name":"South of Fifth Sandwalk, Miami Beach, Miami-Dade County, Florida, 33109, United States of America","address":{"path":"South of Fifth Sandwalk","city":"Miami Beach","county":"Miami-Dade County","state":"Florida","postcode":"33109","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=31.0823&lon=-81.4192&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_georgia={"place_id":"49510144","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"9260878","lat":"31.083523","lon":"-81.4209829","display_name":"Jennings Road, Glynn County, Georgia, 31527, United States of America","address":{"road":"Jennings Road","county":"Glynn County","state":"Georgia","postcode":"31527","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=13.4311&lon=144.6549&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_guam={"place_id":"64236526","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"36979005","lat":"13.4188011","lon":"144.6577079","display_name":"Marine Corps Drive, Apra Harbor, Guam County, Guam, United States of America","address":{"road":"Marine Corps Drive","locality":"Apra Harbor","county":"Guam County","state":"Guam","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=19.6423&lon=-155.4837&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_hawaii={"place_id":"66164927","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"45698610","lat":"19.62918","lon":"-155.5398599","display_name":"Hilo Kona Road, Kailua-Kona, Hawai\u02bbi County, Hawaii, United States of America","address":{"road":"Hilo Kona Road","city":"Kailua-Kona","county":"Hawai\u02bbi County","state":"Hawaii","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=47.6710&lon=-116.7671&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_idaho={"place_id":"53105523","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"13846067","lat":"47.670042","lon":"-116.7670899","display_name":"South Dollar Street, Coeur d'Alene, Kootenai County, Idaho, 83814, United States of America","address":{"road":"South Dollar Street","city":"Coeur d'Alene","county":"Kootenai County","state":"Idaho","postcode":"83814","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=42.05202&lon=-87.67594&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_illinois={"place_id":"63158773","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"33908928","lat":"42.05189995","lon":"-87.6759578506092","display_name":"University Hall, 1897, Sheridan Road, Downtown, Evanston, Cook County, Illinois, 60208, United States of America","address":{"building":"University Hall","house_number":"1897","road":"Sheridan Road","neighbourhood":"Downtown","city":"Evanston","county":"Cook County","state":"Illinois","postcode":"60208","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=40.4179&lon=-86.8969&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_indiana={"place_id":"71946986","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"74495138","lat":"40.4182607","lon":"-86.8976521","display_name":"Columbia Street, Happy Hollow Heights, Tippecanoe County, Indiana, 47901, United States of America","address":{"road":"Columbia Street","hamlet":"Happy Hollow Heights","county":"Tippecanoe County","state":"Indiana","postcode":"47901","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=41.9747&lon=-91.6760&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_iowa={"place_id":"98812115","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"185310640","lat":"41.9750617","lon":"-91.6757381247816","display_name":"Linn County Sheriffs Department, I 380;IA 27, Cedar Rapids, Linn County, Iowa, 52401, United States of America","address":{"police":"Linn County Sheriffs Department","road":"I 380;IA 27","city":"Cedar Rapids","county":"Linn County","state":"Iowa","postcode":"52401","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=37.6888&lon=-97.3271&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_kansas={"place_id":"92181389","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"161510053","lat":"37.6887661","lon":"-97.3278952567447","display_name":"Old Town Parking Garage, North Rock Island, Wichita, Sedgwick County, Kansas, 67202, United States of America","address":{"parking":"Old Town Parking Garage","road":"North Rock Island","city":"Wichita","county":"Sedgwick County","state":"Kansas","postcode":"67202","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=36.8446&lon=-83.3196&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_kentucky={"place_id":"54458735","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"16198892","lat":"36.844965","lon":"-83.3193679","display_name":"KY 38, Harlan, Harlan County, Kentucky, 40831, United States of America","address":{"road":"KY 38","city":"Harlan","county":"Harlan County","state":"Kentucky","postcode":"40831","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=30.1800&lon=-90.1787&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_louisiana={"place_id":"127893731","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"1836431","lat":"30.421468","lon":"-89.9617631947467","display_name":"St. Tammany Parish, Louisiana, United States of America","address":{"county":"St. Tammany Parish","state":"Louisiana","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=44.7903&lon=-68.7829&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_maine={"place_id":"66188993","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"43376862","lat":"44.7904848","lon":"-68.7829047111113","display_name":"Bangor Raceway\/OTB, Bangor, Penobscot County, Maine, 04412, United States of America","address":{"raceway":"Bangor Raceway\/OTB","city":"Bangor","county":"Penobscot County","state":"Maine","postcode":"04412","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=38.3206&lon=-75.6213&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_maryland={"place_id":"66529051","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"47701025","lat":"38.3152772","lon":"-75.6248896","display_name":"South Fruitland Boulevard, Fruitland, Wicomico County, Maryland, 21826, United States of America","address":{"road":"South Fruitland Boulevard","city":"Fruitland","county":"Wicomico County","state":"Maryland","postcode":"21826","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=42.3550&lon=-71.0645&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_massachusetts={"place_id":"59715429","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"24677646","lat":"42.35546545","lon":"-71.0638843757496","display_name":"Visitor Information Center at Boston Common, 148, Tremont Street, Chinatown, Beacon Hill, Boston, Suffolk County, Massachusetts, 02111, United States of America","address":{"information":"Visitor Information Center at Boston Common","house_number":"148","road":"Tremont Street","neighbourhood":"Chinatown","suburb":"Beacon Hill","city":"Boston","county":"Suffolk County","state":"Massachusetts","postcode":"02111","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=42.7153&lon=-84.4995&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_michigan={"place_id":"117203493","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"264540336","lat":"42.71532985","lon":"-84.4995249806439","display_name":"Building 1572, 30, Middlevale Road, Spartan Village, East Lansing, Ingham County, Michigan, 48823, United States of America","address":{"building":"Building 1572","house_number":"30","road":"Middlevale Road","residential":"Spartan Village","city":"East Lansing","county":"Ingham County","state":"Michigan","postcode":"48823","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=47.8278&lon=-90.0484&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_minnesota={"place_id":"69420336","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"56684658","lat":"47.8397542","lon":"-90.0551622","display_name":"Superior Hiking Trail, Cook County, Minnesota, United States of America","address":{"footway":"Superior Hiking Trail","county":"Cook County","state":"Minnesota","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=30.3986&lon=-88.8820&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_mississippi={"place_id":"93852729","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"165919984","lat":"30.3984797","lon":"-88.8818930732571","display_name":"189, Bellman Street, Biloxi, Harrison County, Mississippi, 39501, United States of America","address":{"house_number":"189","road":"Bellman Street","city":"Biloxi","county":"Harrison County","state":"Mississippi","postcode":"39501","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=37.0799&lon=-94.5060&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_missouri={"place_id":"56101640","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"18514619","lat":"37.08136","lon":"-94.5070289","display_name":"Iowa Avenue, Joplin, Jasper County, Missouri, 64801, United States of America","address":{"road":"Iowa Avenue","city":"Joplin","county":"Jasper County","state":"Missouri","postcode":"64801","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=48.3866&lon=-115.5498&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_montana={"place_id":"68329859","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"51770096","lat":"48.386884","lon":"-115.5513568","display_name":"East 9th Street, Libby, Lincoln County, Montana, 59923, United States of America","address":{"road":"East 9th Street","city":"Libby","county":"Lincoln County","state":"Montana","postcode":"59923","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=41.2587&lon=-95.9374&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_nebraska={"place_id":"114746992","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"256624885","lat":"41.25918915","lon":"-95.9378725469971","display_name":"First National Bank Tower, 1601, Dodge Street, Omaha, Douglas County, Nebraska, 68102, United States of America","address":{"building":"First National Bank Tower","house_number":"1601","road":"Dodge Street","city":"Omaha","county":"Douglas County","state":"Nebraska","postcode":"68102","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=36.1215&lon=-115.1704&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_nevada={"place_id":"63631543","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"33996606","lat":"36.1217339","lon":"-115.1705755","display_name":"Rialto bridge, Hughes Center, Paradise, Clark County, Nevada, 89109, United States of America","address":{"footway":"Rialto bridge","suburb":"Hughes Center","town":"Paradise","county":"Clark County","state":"Nevada","postcode":"89109","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=43.5628&lon=-71.9447&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_newhampshire={"place_id":"56068503","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"18851394","lat":"43.560882","lon":"-71.9468629","display_name":"Library Road, Grafton, Grafton County, New Hampshire, 03240, United States of America","address":{"road":"Library Road","town":"Grafton","county":"Grafton County","state":"New Hampshire","postcode":"03240","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=39.9475&lon=-75.1066&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_newjersey={"place_id":"51221798","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"11599189","lat":"39.949244","lon":"-75.1070549","display_name":"Centennial Drive, Camden, Camden County, New Jersey, 08105, United States of America","address":{"road":"Centennial Drive","city":"Camden","county":"Camden County","state":"New Jersey","postcode":"08105","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=34.0790&lon=-107.6179&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_newmexico={"place_id":"77778505","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"104970602","lat":"34.0684393","lon":"-107.6114804","display_name":"Old Highway 60, Socorro County, New Mexico, United States of America","address":{"road":"Old Highway 60","county":"Socorro County","state":"New Mexico","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=42.8126&lon=-73.9379&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_newyork={"place_id":"84525817","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"126855890","lat":"42.81240725","lon":"-73.9381957169258","display_name":"Franklin Plaza, Lafayette Street, City of Schenectady, Schenectady County, New York, 12305, United States of America","address":{"building":"Franklin Plaza","road":"Lafayette Street","city":"City of Schenectady","county":"Schenectady County","state":"New York","postcode":"12305","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=35.7802&lon=-78.6394&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_northcarolina={"place_id":"99468133","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"189846068","lat":"35.7804055","lon":"-78.639099844006","display_name":"Union Square, East Edenton Street, Warehouse District, Raleigh, Wake County, North Carolina, 27601, United States of America","address":{"park":"Union Square","road":"East Edenton Street","suburb":"Warehouse District","city":"Raleigh","county":"Wake County","state":"North Carolina","postcode":"27601","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=48.1459&lon=-103.6232&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_northdakota={"place_id":"49344497","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"9835550","lat":"48.148945","lon":"-103.6237439","display_name":"1st Avenue West, Williston, Williams County, North Dakota, 58801, United States of America","address":{"road":"1st Avenue West","city":"Williston","county":"Williams County","state":"North Dakota","postcode":"58801","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=41.4846&lon=-82.6852&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_ohio={"place_id":"56170259","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"19039813","lat":"41.4843124","lon":"-82.6844091","display_name":"Perimeter Road, Sandusky, Erie County, Ohio, United States of America","address":{"road":"Perimeter Road","city":"Sandusky","county":"Erie County","state":"Ohio","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=36.0514&lon=-95.7892&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_oklahoma={"place_id":"53556138","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"15043426","lat":"36.051459","lon":"-95.7877959","display_name":"East Commercial Street, Broken Arrow, Tulsa County, Oklahoma, 74012, United States of America","address":{"road":"East Commercial Street","city":"Broken Arrow","county":"Tulsa County","state":"Oklahoma","postcode":"74012","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=45.3732&lon=-121.6959&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_oregon={"place_id":"88189444","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"146985872","lat":"45.3834699","lon":"-121.6675317","display_name":"Cooper Spur #600B, Hood River County, Oregon, United States of America","address":{"footway":"Cooper Spur #600B","county":"Hood River County","state":"Oregon","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=40.3340&lon=-75.9300&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_pennsylvania={"place_id":"116304319","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"260794611","lat":"40.3340718","lon":"-75.9294293956808","display_name":"Parking Garage, Cherry Street, Reading, Berks County, Pennsylvania, 19602, United States of America","address":{"parking":"Parking Garage","road":"Cherry Street","city":"Reading","county":"Berks County","state":"Pennsylvania","postcode":"19602","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=18.4364&lon=-66.1188&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_puertorico={"place_id":"57584232","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"22162032","lat":"18.435917","lon":"-66.1189319","display_name":"Calle Antonio R Barcel\u00f3, Pueblo Viejo, Guaynabo, Puerto Rico, 00965, United States of America","address":{"road":"Calle Antonio R Barcel\u00f3","city":"Pueblo Viejo","county":"Guaynabo","state":"Puerto Rico","postcode":"00965","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=41.8251&lon=-71.4194&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_rhodeisland={"place_id":"83352312","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"123069111","lat":"41.82518","lon":"-71.4193269","display_name":"I 95, Providence, Providence County, Rhode Island, 02903, United States of America","address":{"road":"I 95","city":"Providence","county":"Providence County","state":"Rhode Island","postcode":"02903","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=32.7878&lon=-79.9392&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_southcarolina={"place_id":"111459509","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"241968972","lat":"32.7876248","lon":"-79.9386555934906","display_name":"Dream Factory, Warren Street, Charleston, Charleston County, South Carolina, 29424, United States of America","address":{"building":"Dream Factory","road":"Warren Street","city":"Charleston","county":"Charleston County","state":"South Carolina","postcode":"29424","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=43.7148&lon=-98.0249&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_southdakota={"place_id":"71642010","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"73851137","lat":"43.71474935","lon":"-98.0248767861259","display_name":"Mitchell Corn Palace, East 6th Avenue, Mitchell, Davison County, South Dakota, 57301, United States of America","address":{"attraction":"Mitchell Corn Palace","road":"East 6th Avenue","city":"Mitchell","county":"Davison County","state":"South Dakota","postcode":"57301","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=35.1438&lon=-90.0231&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_tennessee={"place_id":"83552895","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"124068656","lat":"35.1386836","lon":"-90.0240493","display_name":"I 240, Memphis, Shelby County, Tennessee, 38104, United States of America","address":{"road":"I 240","city":"Memphis","county":"Shelby County","state":"Tennessee","postcode":"38104","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=30.2655&lon=-97.7559&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_texas={"place_id":"111446948","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"238575801","lat":"30.2657266","lon":"-97.7556813","display_name":"Pfluger Pedestrian Bridge, Austin, Travis County, Texas, 78746, United States of America","address":{"footway":"Pfluger Pedestrian Bridge","city":"Austin","county":"Travis County","state":"Texas","postcode":"78746","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=18.3433&lon=-64.9347&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_virginislands={"place_id":"2526584","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"node","osm_id":"356559537","lat":"18.3430118","lon":"-64.9354233","display_name":"Christ Church Methodist Church, Rosen Gade, Charlotte Amalie, St. Thomas Island, United States Virgin Islands, 00803, United States of America","address":{"place_of_worship":"Christ Church Methodist Church","road":"Rosen Gade","town":"Charlotte Amalie","county":"St. Thomas Island","state":"United States Virgin Islands","postcode":"00803","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=40.5888&lon=-111.6378&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_utah={"place_id":"115632992","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"257809595","lat":"40.5886217","lon":"-111.6378685","display_name":"Alta Lodge Tow, East Perruvian Acre Road, Alta, Salt Lake County, Utah, United States of America","address":{"address29":"Alta Lodge Tow","road":"East Perruvian Acre Road","town":"Alta","county":"Salt Lake County","state":"Utah","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=44.2597&lon=-72.5800&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_vermont={"place_id":"112934331","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"244468089","lat":"44.25920675","lon":"-72.5796506738965","display_name":"53, Memorial Drive, Montpelier, Washington County, Vermont, 05602, United States of America","address":{"house_number":"53","road":"Memorial Drive","city":"Montpelier","county":"Washington County","state":"Vermont","postcode":"05602","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=36.9454&lon=-76.2888&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_virginia={"place_id":"67801749","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"48865930","lat":"36.944601","lon":"-76.2960629","display_name":"Bellinger Blvd, Glenwood Park, Norfolk, Virginia, 23511, United States of America","address":{"road":"Bellinger Blvd","hamlet":"Glenwood Park","city":"Norfolk","state":"Virginia","postcode":"23511","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=46.8598&lon=-121.7256&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_washington={"place_id":"110787862","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"235233247","lat":"46.8223122","lon":"-121.7272168","display_name":"Camp Muir Route, Paradise, Pierce County, Washington, United States of America","address":{"footway":"Camp Muir Route","hamlet":"Paradise","county":"Pierce County","state":"Washington","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=38.3686&lon=-81.6070&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_westvirginia={"place_id":"53946928","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"15572790","lat":"38.368065","lon":"-81.6063089","display_name":"Barlow Drive, Twomile, Kanawha County, West Virginia, 25311, United States of America","address":{"road":"Barlow Drive","hamlet":"Twomile","county":"Kanawha County","state":"West Virginia","postcode":"25311","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=45.8719&lon=-89.6930&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_wisconsin={"place_id":"58231065","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"21562994","lat":"45.8707426","lon":"-89.6984064","display_name":"Cedar Street, Minocqua, Oneida County, Wisconsin, United States of America","address":{"road":"Cedar Street","village":"Minocqua","county":"Oneida County","state":"Wisconsin","country":"United States of America","country_code":"us"}}; -// https://nominatim.openstreetmap.org/reverse?format=json&lat=42.8590&lon=-106.3126&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_usa_wyoming={"place_id":"54223976","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"15763013","lat":"42.8591296","lon":"-106.317155","display_name":"East H Street, Casper, Natrona County, Wyoming, 82601, United States of America","address":{"road":"East H Street","city":"Casper","county":"Natrona County","state":"Wyoming","postcode":"82601","country":"United States of America","country_code":"us"}}; -/* }}} */ -/* Italy {{{ */ -var nominatimTestJSON_italy = { - "place_id" : "127565598", - "licence" : "Data © OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright", - "osm_type" : "relation", - "osm_id" : "40784", - "lat" : "41.9808038", - "lon" : "12.7662312", - "display_name" : "Lazio, Italy", - "address": { - "state" : "Lazio", - "country" : "Italy", - "country_code" : "it", - }, -} -/* }}} */ - -/* Czech Republic {{{ */ -// https://nominatim.openstreetmap.org/reverse?format=json&lat=50.0874401&lon=14.4212556&zoom=18&addressdetails=1&accept-language=en -var nominatimTestJSON_czechRepublic = { - "place_id":"2582799432", - "licence":"Data © OpenStreetMap contributors, ODbL 1.0. https:\/\/www.openstreetmap.org\/copyright", - "osm_type":"way", - "osm_id":"340086966", - "lat":"50.08748275", - "lon":"14.4213733265222", - //"display_name":"Pražský poledník, Staroměstské náměstí, Old Town, Prague, okres Hlavní město Praha, Hlavní město Praha, Praha, 11000, Czech Republic", - "address": { - //"memorial":"Pražský poledník", - //"pedestrian":"Staroměstské náměstí", - //"suburb":"Old Town", - //"city":"Prague", - //"county":"okres Hlavní město Praha", - //"state":"Praha", - "postcode":"11000", - "country":"Czech Republic", - "country_code":"cz" - } -} -/* }}} */ - -/* }}} */ /* }}} */ var sane_value_suffix = '; 00:23-00:42 closed "warning at correct position?"'; @@ -597,7 +381,7 @@ test.addTest('Time ranges spanning midnight', [ [ '2012.10.05 22:00', '2012.10.06 02:00' ], [ '2012.10.06 22:00', '2012.10.07 02:00' ], [ '2012.10.07 22:00', '2012.10.08 00:00' ], - ], 1000 * 60 * 60 * 4 * 7, 0, true, nominatimTestJSON); + ], 1000 * 60 * 60 * 4 * 7, 0, true, nominatim_default); test.addTest('Time ranges spanning midnight', [ '22:00-26:00', // reference value for prettify @@ -611,7 +395,7 @@ test.addTest('Time ranges spanning midnight', [ [ '2012.10.05 22:00', '2012.10.06 02:00' ], [ '2012.10.06 22:00', '2012.10.07 02:00' ], [ '2012.10.07 22:00', '2012.10.08 00:00' ], - ], 1000 * 60 * 60 * 4 * 7, 0, true, nominatimTestJSON); + ], 1000 * 60 * 60 * 4 * 7, 0, true, nominatim_default); test.addTest('Time ranges spanning midnight', [ 'We 22:00-22:00', @@ -688,19 +472,19 @@ test.addTest('Open end', [ ], '2012.10.01 0:00', '2012.10.02 0:00', [ [ '2012.10.01 00:00', '2012.10.01 03:00', true, 'Specified as open end. Closing time was guessed.' ], [ '2012.10.01 17:00', '2012.10.02 00:00', true, 'Specified as open end. Closing time was guessed.' ], - ], 0, 1000 * 60 * 60 * (3 + 24 - 17), true, nominatimTestJSON, 'not last test'); + ], 0, 1000 * 60 * 60 * (3 + 24 - 17), true, nominatim_default, 'not last test'); test.addTest('Open end, variable time', [ 'sunrise+', ], '2012.10.01 0:00', '2012.10.02 0:00', [ [ '2012.10.01 07:22', '2012.10.02 00:00', true, 'Specified as open end. Closing time was guessed.' ], - ], 0, 1000 * 60 * (60 * 16 + 60 - 22), false, nominatimTestJSON, 'not last test'); + ], 0, 1000 * 60 * (60 * 16 + 60 - 22), false, nominatim_default, 'not last test'); test.addTest('Open end, variable time', [ '(sunrise+01:00)+', ], '2012.10.01 0:00', '2012.10.02 0:00', [ [ '2012.10.01 08:22', '2012.10.02 00:00', true, 'Specified as open end. Closing time was guessed.' ], - ], 0, 1000 * 60 * (60 * 15 + 60 - 22), false, nominatimTestJSON, 'not last test'); + ], 0, 1000 * 60 * (60 * 15 + 60 - 22), false, nominatim_default, 'not last test'); test.addTest('Open end', [ '17:00+ off', @@ -787,7 +571,7 @@ test.addTest('variable time range followed by open end', [ [ '2012.10.01 00:00', '2012.10.01 04:00', true, 'Specified as open end. Closing time was guessed.' ], [ '2012.10.01 14:00', '2012.10.01 19:00' ], [ '2012.10.01 19:00', '2012.10.02 00:00', true, 'Specified as open end. Closing time was guessed.' ], - ], 1000 * 60 * 60 * 5, 1000 * 60 * 60 * (4 + 5), false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * 5, 1000 * 60 * 60 * (4 + 5), false, nominatim_default, 'not last test'); test.addTest('variable time range followed by open end', [ 'sunrise-14:00+', @@ -796,7 +580,7 @@ test.addTest('variable time range followed by open end', [ ], '2012.10.01 0:00', '2012.10.02 5:00', [ [ '2012.10.01 07:22', '2012.10.01 14:00' ], [ '2012.10.01 14:00', '2012.10.02 00:00', true, 'Specified as open end. Closing time was guessed.' ], - ], 1000 * 60 * (38 + 60 * 6), 1000 * 60 * 60 * 10, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * (38 + 60 * 6), 1000 * 60 * 60 * 10, false, nominatim_default, 'not only test'); test.addTest('variable time range followed by open end', [ 'sunrise-(sunset+01:00)+', @@ -805,7 +589,7 @@ test.addTest('variable time range followed by open end', [ [ '2012.10.06 00:00', '2012.10.06 05:00', true, 'Specified as open end. Closing time was guessed.' ], [ '2012.10.06 07:29', '2012.10.06 19:50' ], [ '2012.10.06 19:50', '2012.10.07 00:00', true, 'Specified as open end. Closing time was guessed.' ], - ], 1000 * 60 * (31 + (19 - 8) * 60 + 50), 1000 * 60 * (60 * 5 + 60 * 4 + 10), false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * (31 + (19 - 8) * 60 + 50), 1000 * 60 * (60 * 5 + 60 * 4 + 10), false, nominatim_default, 'not last test'); test.addTest('variable time range followed by open end, day wrap and different states', [ 'Fr 11:00-24:00+ open "geöffnet täglich von 11:00 Uhr bis tief in die Nacht"', @@ -816,7 +600,7 @@ test.addTest('variable time range followed by open end, day wrap and different s ], '2012.10.01 0:00', '2012.10.08 0:00', [ [ '2012.10.05 11:00', '2012.10.06 00:00', false, 'geöffnet täglich von 11:00 Uhr bis tief in die Nacht' ], [ '2012.10.06 00:00', '2012.10.06 08:00', true, 'geöffnet täglich von 11:00 Uhr bis tief in die Nacht' ], - ], 1000 * 60 * 60 * 13, 1000 * 60 * 60 * 8, true, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * 13, 1000 * 60 * 60 * 8, true, nominatim_default, 'not last test'); // }}} // }}} @@ -826,14 +610,14 @@ test.addTest('Variable times e.g. dawn, dusk', [ 'dawn-dusk', ], '2012.10.01 0:00', '2012.10.02 0:00', [ [ '2012.10.01 06:50', '2012.10.01 19:32' ], - ], 1000 * 60 * (60 * 12 + 10 + 32), 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * (60 * 12 + 10 + 32), 0, false, nominatim_default, 'not last test'); test.addTest('Variable times e.g. sunrise, sunset', [ 'Mo sunrise-sunset', 'sunrise-sunset', ], '2012.10.01 0:00', '2012.10.02 0:00', [ [ '2012.10.01 07:22', '2012.10.01 19:00' ], - ], 1000 * 60 * (60 * 11 + 38), 0, false, nominatimTestJSON); + ], 1000 * 60 * (60 * 11 + 38), 0, false, nominatim_default); test.addTest('Variable times e.g. sunrise, sunset without coordinates (→ constant times)', [ 'sunrise-sunset', @@ -847,7 +631,7 @@ test.addTest('Variable times e.g. sunrise, sunset', [ // 'sunrise-sunset closed "Beware of sunburn!"', // Not so intuitive I guess. ], '2012.10.01 0:00', '2012.10.02 0:00', [ [ '2012.10.01 07:22', '2012.10.01 19:00', false, 'Beware of sunburn!' ], - ], 1000 * 60 * (60 * 11 + 38), 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * (60 * 11 + 38), 0, false, nominatim_default, 'not only test'); test.addTest('Variable times calculation without coordinates', [ '(sunrise+01:02)-(sunset-00:30)', @@ -873,7 +657,7 @@ test.addTest('Variable times e.g. sunrise, sunset over a few days', [ [ '2012.10.01 07:22', '2012.10.01 19:00' ], [ '2012.10.02 07:23', '2012.10.02 18:58' ], [ '2012.10.03 07:25', '2012.10.03 18:56' ], - ], 1000 * 60 * ((60 * 11 + 38) + (60 * 11 + 37 - 2) + (60 * 11 + 35 - 4)), 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * ((60 * 11 + 38) + (60 * 11 + 37 - 2) + (60 * 11 + 35 - 4)), 0, false, nominatim_default, 'not only test'); test.addTest('Variable times calculation with coordinates', [ '(sunrise+02:00)-sunset', @@ -881,7 +665,7 @@ test.addTest('Variable times calculation with coordinates', [ [ '2012.10.01 09:22', '2012.10.01 19:00' ], [ '2012.10.02 09:23', '2012.10.02 18:58' ], [ '2012.10.03 09:25', '2012.10.03 18:56' ], - ], 1000 * 60 * ((60 * 11 + 38) + (60 * 11 + 37 - 2) + (60 * 11 + 35 - 4) - 60 * 2 * 3), 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * ((60 * 11 + 38) + (60 * 11 + 37 - 2) + (60 * 11 + 35 - 4) - 60 * 2 * 3), 0, false, nominatim_default, 'not last test'); test.addTest('Variable times which moves over fix end time', [ 'sunrise-08:02', @@ -894,7 +678,7 @@ test.addTest('Variable times which moves over fix end time', [ [ '2013.01.31 07:56', '2013.01.31 08:02' ], [ '2013.02.01 07:55', '2013.02.01 08:02' ], [ '2013.02.02 07:54', '2013.02.02 08:02' ], - ], 1000 * 60 * (6 * 2 + 1 + 2 + 4 + 5 + 6), 0, false, nominatimTestJSON); + ], 1000 * 60 * (6 * 2 + 1 + 2 + 4 + 5 + 6), 0, false, nominatim_default); test.addTest('Variable times which moves over fix end time', [ 'sunrise-08:00', @@ -904,7 +688,7 @@ test.addTest('Variable times which moves over fix end time', [ [ '2013.01.31 07:56', '2013.01.31 08:00' ], [ '2013.02.01 07:55', '2013.02.01 08:00' ], [ '2013.02.02 07:54', '2013.02.02 08:00' ], - ], 1000 * 60 * (1 + 2 + 4 + 5 + 6), 0, false, nominatimTestJSON); + ], 1000 * 60 * (1 + 2 + 4 + 5 + 6), 0, false, nominatim_default); test.addTest('Variable times which moves over fix end time', [ 'sunrise-07:58', @@ -912,13 +696,13 @@ test.addTest('Variable times which moves over fix end time', [ [ '2013.01.31 07:56', '2013.01.31 07:58' ], [ '2013.02.01 07:55', '2013.02.01 07:58' ], [ '2013.02.02 07:54', '2013.02.02 07:58' ], - ], 1000 * 60 * (2 + 3 + 4), 0, false, nominatimTestJSON); + ], 1000 * 60 * (2 + 3 + 4), 0, false, nominatim_default); test.addTest('Variable times which moves over fix end time', [ 'sunrise-06:00', ], '2013.01.26 0:00', '2013.02.03 0:00', [ // Not open in range. Constant sunrise <= end time < from time - ], 0, 0, false, nominatimTestJSON); + ], 0, 0, false, nominatim_default); test.addTest('Variable times which moves over fix end time', [ 'sunrise-05:59', // end time < constant time < from time @@ -926,20 +710,20 @@ test.addTest('Variable times which moves over fix end time', [ [ '2013.01.26 00:00', '2013.01.26 05:59' ], [ '2013.01.26 08:02', '2013.01.27 05:59' ], [ '2013.01.27 08:00', '2013.01.28 00:00' ], - ], 1000 * 60 * ((60 * 5 + 59) + (60 * 22 - 3) + (60 * 16)), 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * ((60 * 5 + 59) + (60 * 22 - 3) + (60 * 16)), 0, false, nominatim_default, 'not last test'); test.addTest('Variable times which moves over fix end time', [ 'sunrise-06:00', // from time < constant time <= end time ], '2013.04.15 0:00', '2013.04.19 0:00', [ [ '2013.04.17 05:59', '2013.04.17 06:00' ], [ '2013.04.18 05:56', '2013.04.18 06:00' ], - ], 1000 * 60 * (1 + 4), 0, false, nominatimTestJSON_sunrise_below_default); + ], 1000 * 60 * (1 + 4), 0, false, nominatim_sunrise_below); test.addTest('Variable times which moves over fix end time', [ ignored('sunrise-05:59'), // from time < end time <= constant time ], '2013.04.13 0:00', '2013.04.19 0:00', [ [ 'something else', '' ], - ], 1000 * 60 * 3, 0, false, nominatimTestJSON_sunrise_below_default, 'not last test'); + ], 1000 * 60 * 3, 0, false, nominatim_sunrise_below, 'not last test'); test.addTest('Variable times spanning midnight', [ 'sunset-sunrise', @@ -948,7 +732,7 @@ test.addTest('Variable times spanning midnight', [ [ '2012.10.01 00:00', '2012.10.01 07:22' ], [ '2012.10.01 19:00', '2012.10.02 07:23' ], [ '2012.10.02 18:58', '2012.10.03 00:00' ], - ], 1000 * 60 * ((60 * 7 + 22) + (60 * (5 + 7) + 23) + (60 * 5 + 2)), 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * ((60 * 7 + 22) + (60 * (5 + 7) + 23) + (60 * 5 + 2)), 0, false, nominatim_default, 'not last test'); test.addTest('Variable times spanning midnight', [ 'sunset-sunrise', @@ -959,7 +743,7 @@ test.addTest('Variable times spanning midnight', [ ], '2012.10.01 0:00', '2012.10.02 0:00', [ [ '2012.10.01 00:00', '2012.10.01 07:22' ], [ '2012.10.01 19:00', '2012.10.02 00:00' ], - ], 1000 * 60 * ((60 * 7 + 22) + (60 * 5)), 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * ((60 * 7 + 22) + (60 * 5)), 0, false, nominatim_default, 'not last test'); // }}} // holidays {{{ @@ -994,7 +778,7 @@ test.addTest('Variable days: public holidays', [ [ '2014.11.01 00:00', '2014.11.02 00:00', false, 'Allerheiligen' ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, '1. Weihnachtstag' ], [ '2014.12.26 00:00', '2014.12.27 00:00', false, '2. Weihnachtstag' ], - ], 1000 * 60 * 60 * 24 * (20 + 2 * 2), 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * (20 + 2 * 2), 0, false, nominatim_default, 'not only test'); test.addTest('Variable days: public holidays', [ 'open; PH off', @@ -1003,21 +787,21 @@ test.addTest('Variable days: public holidays', [ [ '2013.04.02 00:00', '2013.05.01 00:00' ], [ '2013.05.02 00:00', '2013.05.09 00:00' ], [ '2013.05.10 00:00', '2013.05.11 00:00' ], - ], 1000 * 60 * 60 * 24 * (30 - 1 + 7 + 1), 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * 24 * (30 - 1 + 7 + 1), 0, false, nominatim_default, 'not last test'); test.addTest('Variable days: public holidays (with time range)', [ 'PH 12:00-13:00', ], '2012.01.01 0:00', '2012.04.01 0:00', [ [ '2012.01.01 12:00', '2012.01.01 13:00', false, 'Neujahrstag' ], [ '2012.01.06 12:00', '2012.01.06 13:00', false, 'Heilige Drei Könige' ], - ], 1000 * 60 * 60 * 2, 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * 2, 0, false, nominatim_default, 'not last test'); test.addTest('Variable days: public holidays (with time range)', [ 'PH 12:00-13:00 open "this comment should override the holiday name which is returned as comment if PH matches."', ], '2012.01.01 0:00', '2012.04.01 0:00', [ [ '2012.01.01 12:00', '2012.01.01 13:00', false, 'this comment should override the holiday name which is returned as comment if PH matches.' ], [ '2012.01.06 12:00', '2012.01.06 13:00', false, 'this comment should override the holiday name which is returned as comment if PH matches.' ], - ], 1000 * 60 * 60 * 2, 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * 2, 0, false, nominatim_default, 'not last test'); test.addTest('PH: Only if PH is Wednesday', [ 'PH We,Fr', @@ -1027,7 +811,7 @@ test.addTest('PH: Only if PH is Wednesday', [ [ '2012.01.06 00:00', '2012.01.07 00:00', false, 'Heilige Drei Könige' ], // Fr [ '2012.04.06 00:00', '2012.04.07 00:00', false, 'Karfreitag' ], // Fr [ '2012.10.03 00:00', '2012.10.04 00:00', false, 'Tag der Deutschen Einheit' ], // We - ], 1000 * 60 * 60 * 24 * 3, 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * 3, 0, false, nominatim_default, 'not only test'); test.addTest('SH', [ 'SH Mo-Fr', @@ -1042,7 +826,7 @@ test.addTest('SH', [ ], '2012.12.22 0:00', '2013.01.08 0:00', [ [ '2012.12.24 00:00', '2012.12.29 00:00', false, 'Weihnachtsferien' ], [ '2012.12.31 00:00', '2013.01.05 00:00', false, 'Weihnachtsferien' ], - ], 1000 * 60 * 60 * 24 * (5 * 2), 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * (5 * 2), 0, false, nominatim_default, 'not only test'); test.addTest('SH', [ 'SH Mo-Fr', @@ -1061,7 +845,7 @@ test.addTest('Variable days: public holidays', [ [ '2014.12.27 00:00', '2014.12.28 00:00', false, 'Day after 2. Weihnachtstag' ], [ '2015.01.02 00:00', '2015.01.03 00:00', false, 'Day after Neujahrstag' ], [ '2015.01.07 00:00', '2015.01.08 00:00', false, 'Day after Heilige Drei Könige' ], - ], 1000 * 60 * 60 * 24 * (3 + 2), 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * 24 * (3 + 2), 0, false, nominatim_default, 'not last test'); test.addTest('Variable days: public holidays', [ 'PH -1 day Mo-We', @@ -1074,7 +858,7 @@ test.addTest('Variable days: public holidays', [ // [ '2014.12.25 00:00', '2014.12.26 00:00', false, 'Day before 2. Weihnachtstag' ], // 25: Th [ '2014.12.31 00:00', '2015.01.01 00:00', false, 'Day before Neujahrstag' ], // 31: We [ '2015.01.05 00:00', '2015.01.06 00:00', false, 'Day before Heilige Drei Könige' ], // 05: Mo - ], 1000 * 60 * 60 * 24 * 3, 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * 24 * 3, 0, false, nominatim_default, 'not last test'); // FIXME test.addTest('Variable days: public holidays', [ @@ -1086,7 +870,7 @@ test.addTest('Variable days: public holidays', [ // [ '2014.12.25 00:00', '2014.12.26 00:00', false, 'Day before 2. Weihnachtstag' ], // 25: Th [ '2014.12.31 00:00', '2015.01.01 00:00', false, 'Day before Neujahrstag' ], // 31: We [ '2015.01.05 00:00', '2015.01.06 00:00', false, 'Day before Heilige Drei Könige' ], // 05: Mo - ], 1000 * 60 * 60 * 24 * 3, 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * 24 * 3, 0, false, nominatim_default, 'not last test'); test.addTest('Variable days: public holidays', [ 'PH -1 day', @@ -1101,7 +885,7 @@ test.addTest('Variable days: public holidays', [ [ '2014.12.25 00:00', '2014.12.26 00:00', false, 'Day before 2. Weihnachtstag' ], [ '2014.12.31 00:00', '2015.01.01 00:00', false, 'Day before Neujahrstag' ], [ '2015.01.05 00:00', '2015.01.06 00:00', false, 'Day before Heilige Drei Könige' ], - ], 1000 * 60 * 60 * 24 * (3 + 2), 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * 24 * (3 + 2), 0, false, nominatim_default, 'not last test'); // http://www.schulferien.org/Kalender_mit_Ferien/kalender_2014_ferien_Baden_Wuerttemberg.html test.addTest('Variable days: school holidays', [ @@ -1113,7 +897,7 @@ test.addTest('Variable days: school holidays', [ [ '2014.07.31 00:00', '2014.09.14 00:00', false, 'Sommerferien' ], [ '2014.10.27 00:00', '2014.10.31 00:00', false, 'Herbstferien' ], [ '2014.12.22 00:00', '2015.01.06 00:00', false, 'Weihnachtsferien' ], - ], 1000 * 60 * 60 * 24 * (4 + 12 + 12 + 1 + 31 + 13 + 4 + 15), 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * (4 + 12 + 12 + 1 + 31 + 13 + 4 + 15), 0, false, nominatim_default, 'not only test'); // http://www.schulferien.org/Kalender_mit_Ferien/kalender_2015_ferien_Baden_Wuerttemberg.html // https://github.com/opening-hours/opening_hours.js/issues/83 @@ -1121,7 +905,7 @@ test.addTest('Variable days: school holidays', [ 'SH', ], '2015.01.05 1:00', '2015.01.05 5:00', [ [ '2015.01.05 01:00', '2015.01.05 05:00', false, 'Weihnachtsferien' ], - ], 1000 * 60 * 60 * 4, 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 4, 0, false, nominatim_default, 'not only test'); test.addTest('Variable days: school holiday', [ 'open; SH off', @@ -1129,7 +913,7 @@ test.addTest('Variable days: school holiday', [ [ '2014.01.05 00:00', '2014.04.14 00:00' ], [ '2014.04.26 00:00', '2014.06.10 00:00' ], ], 1000 * 60 * 60 * 24 * (31 - 5 + 28 + 31 + 14 + 4 + 31 + 10) -(/* daylight saving time CEST */ 1000 * 60 * 60), - 0, false, nominatimTestJSON, 'not last test'); + 0, false, nominatim_default, 'not last test'); test.addTest('Variable days: school holidays', [ 'SH', @@ -1143,7 +927,7 @@ test.addTest('Variable days: school holidays', [ [ '2014.07.31 00:00', '2014.09.11 00:00', false, 'Sommerferien' ], // 1 + 31 + 10 [ '2014.10.27 00:00', '2014.11.09 00:00', false, 'Herbstferien' ], // 5 + 8 [ '2014.12.22 00:00', '2015.01.06 00:00', false, 'Weihnachtsferien' ], // 10 + 5 - ], 1000 * 60 * 60 * 24 * (3 + 2 + 20 + 1 + 1 + 1 + (1 + 31 + 10) + (5 + 8) + (10 + 5)), 0, false, nominatim_for_loc.de.hb, 'not last test'); + ], 1000 * 60 * 60 * 24 * (3 + 2 + 20 + 1 + 1 + 1 + (1 + 31 + 10) + (5 + 8) + (10 + 5)), 0, false, nominatim_by_loc.de_hb, 'not last test'); test.addTest('SH: Only if SH is Wednesday', [ 'SH We', @@ -1153,7 +937,7 @@ test.addTest('SH: Only if SH is Wednesday', [ [ '2014.01.01 00:00', '2014.01.02 00:00', false, 'Weihnachtsferien' ], [ '2014.04.16 00:00', '2014.04.17 00:00', false, 'Osterferien' ], [ '2014.04.23 00:00', '2014.04.24 00:00', false, 'Osterferien' ], - ], 1000 * 60 * 60 * 24 * 3, 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * 3, 0, false, nominatim_default, 'not only test'); test.addTest('Variable days: school holidays', [ 'SH,PH', @@ -1164,7 +948,7 @@ test.addTest('Variable days: school holidays', [ [ '2014.01.01 00:00', '2014.01.02 00:00', false, 'Neujahrstag' ], [ '2014.01.02 00:00', '2014.01.05 00:00', false, 'Weihnachtsferien' ], [ '2014.01.06 00:00', '2014.01.07 00:00', false, 'Heilige Drei Könige' ], - ], 1000 * 60 * 60 * 24 * (4 + 1), 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * 24 * (4 + 1), 0, false, nominatim_default, 'not last test'); test.addTest('Variable days: school holidays', [ 'Su,SH,PH', @@ -1191,7 +975,7 @@ test.addTest('Variable days: school holidays', [ [ '2014.01.26 00:00', '2014.01.27 00:00' ], [ '2014.02.02 00:00', '2014.02.03 00:00' ], [ '2014.02.09 00:00', '2014.02.10 00:00' ], - ], 1000 * 60 * 60 * 24 * (4 + 1 + 6), 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * (4 + 1 + 6), 0, false, nominatim_default, 'not only test'); test.addTest('Variable days: Everyday including public holidays', [ 'Mo-Su,PH', @@ -1201,7 +985,7 @@ test.addTest('Variable days: Everyday including public holidays', [ [ '2014.01.02 00:00', '2014.01.06 00:00' ], [ '2014.01.06 00:00', '2014.01.07 00:00', false, 'Heilige Drei Könige' ], [ '2014.01.07 00:00', '2014.01.15 00:00' ], - ], 1000 * 60 * 60 * 24 * 14, 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * 24 * 14, 0, false, nominatim_default, 'not last test'); test.addTest('Variable days: Italian public holidays', [ 'PH', @@ -1219,13 +1003,13 @@ test.addTest('Variable days: Italian public holidays', [ [ '2014.12.08 00:00', '2014.12.09 00:00', false, 'Immacolata Concezione' ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, 'Natale di Gesù' ], [ '2014.12.26 00:00', '2014.12.27 00:00', false, 'Santo Stefano' ], - ], 1000 * 60 * 60 * 24 * 13, 0, false, nominatimTestJSON_italy, 'not last test', { 'warnings_severity': 5 }); + ], 1000 * 60 * 60 * 24 * 13, 0, false, nominatim_by_loc.it, 'not last test'); test.addTest('SH(summer holiday) workaround', [ 'Jul-Sep SH', ], '2015.01.01 0:00', '2016.01.01 0:00', [ [ '2015.07.30 00:00', '2015.09.13 00:00', false, 'Sommerferien' ], - ], 1000 * 60 * 60 * 24 * (2 + 31 + 12), 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * (2 + 31 + 12), 0, false, nominatim_default, 'not only test'); /* Romania {{{ */ test.addTest('SH for Romania', [ @@ -1239,7 +1023,7 @@ test.addTest('SH for Romania', [ [ '2016.01.30 00:00', '2016.02.08 00:00', false, 'Vacanţa intersemestrială' ], [ '2016.04.23 00:00', '2016.05.04 00:00', false, 'Vacanța de primăvară' ], [ '2016.06.18 00:00', '2016.09.05 00:00', false, 'Vacanța de vară' ], -], 19267200000, 0, false, nominatim_for_loc.ro.ro, 'not only test'); +], 19267200000, 0, false, nominatim_by_loc.ro, 'not only test'); /* }}} */ /* Russian holidays {{{ */ @@ -1260,7 +1044,7 @@ test.addTest('Variable days: Russian common public holidays', [ [ '2014.05.09 00:00', '2014.05.10 00:00', false, 'День Победы' ], [ '2014.06.12 00:00', '2014.06.13 00:00', false, 'День России' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 0), 0, false, nominatimTestJSON_russia_sanktpeterburg, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 0), 0, false, nominatim_by_loc.ru_state_unknown, 'not last test'); test.addTest('Variable days: Russian public holidays. Republic of Tatarstan', [ 'PH', @@ -1283,7 +1067,7 @@ test.addTest('Variable days: Russian public holidays. Republic of Tatarstan', [ [ '2014.10.04 00:00', '2014.10.05 00:00', false, 'Курбан-байрам' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], [ '2014.11.06 00:00', '2014.11.07 00:00', false, 'День Конституции Республики Татарстан' ], -], 1000 * 60 * 60 * 24 * (14 + 4), 0, false, nominatimTestJSON_russia_tatarstan, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 4), 0, false, nominatim_by_loc.ru_tatarstan, 'not last test'); test.addTest('Variable days: Russian public holidays. Republic of Bashkortostan', [ 'PH', @@ -1306,7 +1090,7 @@ test.addTest('Variable days: Russian public holidays. Republic of Bashkortostan' [ '2014.10.11 00:00', '2014.10.12 00:00', false, 'День Республики Башкирии' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], [ '2014.12.24 00:00', '2014.12.25 00:00', false, 'День Конституции Башкортостана' ], -], 1000 * 60 * 60 * 24 * (14 + 4), 0, false, nominatimTestJSON_russia_bashkortostan, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 4), 0, false, nominatim_by_loc.ru_bashkortostan, 'not last test'); test.addTest('Variable days: Russian public holidays. Chuvash Republic', [ 'PH', @@ -1326,7 +1110,7 @@ test.addTest('Variable days: Russian public holidays. Chuvash Republic', [ [ '2014.06.12 00:00', '2014.06.13 00:00', false, 'День России' ], [ '2014.06.24 00:00', '2014.06.25 00:00', false, 'День Чувашской республики' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 1), 0, false, nominatimTestJSON_russia_chuvash, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 1), 0, false, nominatim_by_loc.ru_chuvashia, 'not last test'); test.addTest('Variable days: Russian public holidays. Sakha Republic', [ 'PH', @@ -1348,7 +1132,7 @@ test.addTest('Variable days: Russian public holidays. Sakha Republic', [ [ '2014.06.23 00:00', '2014.06.24 00:00', false, 'Ысыах' ], [ '2014.09.27 00:00', '2014.09.28 00:00', false, 'День государственности Республики Саха' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 3), 0, false, nominatimTestJSON_russia_sakha, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 3), 0, false, nominatim_by_loc.ru_sakha, 'not last test'); test.addTest('Variable days: Russian public holidays. Republic of Kalmykia', [ 'PH', @@ -1372,7 +1156,7 @@ test.addTest('Variable days: Russian public holidays. Republic of Kalmykia', [ [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], [ '2014.12.15 00:00', '2014.12.16 00:00', false, 'Зул' ], [ '2014.12.28 00:00', '2014.12.29 00:00', false, 'День памяти жертв депортации калмыцкого народа' ], -], 1000 * 60 * 60 * 24 * (14 + 5), 0, false, nominatimTestJSON_russia_kalmykia, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 5), 0, false, nominatim_by_loc.ru_kalmykia, 'not last test'); test.addTest('Variable days: Russian public holidays. Republic of Buryatia', [ 'PH', @@ -1392,7 +1176,7 @@ test.addTest('Variable days: Russian public holidays. Republic of Buryatia', [ [ '2014.05.09 00:00', '2014.05.10 00:00', false, 'День Победы' ], [ '2014.06.12 00:00', '2014.06.13 00:00', false, 'День России' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 1), 0, false, nominatimTestJSON_russia_buryatia, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 1), 0, false, nominatim_by_loc.ru_buryatia, 'not last test'); test.addTest('Variable days: Russian public holidays. Republic of Karelia', [ 'PH', @@ -1413,7 +1197,7 @@ test.addTest('Variable days: Russian public holidays. Republic of Karelia', [ [ '2014.06.12 00:00', '2014.06.13 00:00', false, 'День России' ], [ '2014.09.30 00:00', '2014.10.01 00:00', false, 'День освобождения Карелии от фашистских захватчиков' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 2), 0, false, nominatimTestJSON_russia_karelia, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 2), 0, false, nominatim_by_loc.ru_karelia, 'not last test'); test.addTest('Variable days: Russian public holidays. Republic of Udmurtia', [ 'PH', @@ -1433,7 +1217,7 @@ test.addTest('Variable days: Russian public holidays. Republic of Udmurtia', [ [ '2014.05.31 00:00', '2014.06.01 00:00', false, 'День Государственности Удмуртской Республики' ], [ '2014.06.12 00:00', '2014.06.13 00:00', false, 'День России' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 1), 0, false, nominatimTestJSON_russia_udmurtia, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 1), 0, false, nominatim_by_loc.ru_udmurtia, 'not last test'); test.addTest('Variable days: Russian public holidays. Republic of Adygea', [ 'PH', @@ -1455,7 +1239,7 @@ test.addTest('Variable days: Russian public holidays. Republic of Adygea', [ [ '2014.10.04 00:00', '2014.10.05 00:00', false, 'Курбан-байрам' ], [ '2014.10.05 00:00', '2014.10.06 00:00', false, 'День образования Республики Адыгея' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 3), 0, false, nominatimTestJSON_russia_adygea, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 3), 0, false, nominatim_by_loc.ru_adygea, 'not last test'); test.addTest('Variable days: Russian public holidays. Republic of Dagestan', [ 'PH', @@ -1478,7 +1262,7 @@ test.addTest('Variable days: Russian public holidays. Republic of Dagestan', [ [ '2014.09.15 00:00', '2014.09.16 00:00', false, 'День единства народов Дагестана' ], [ '2014.10.04 00:00', '2014.10.05 00:00', false, 'Курбан-байрам' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 4), 0, false, nominatimTestJSON_russia_dagestan, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 4), 0, false, nominatim_by_loc.ru_dagestan, 'not last test'); test.addTest('Variable days: Russian public holidays. Republic of Ingushetia', [ 'PH', @@ -1501,7 +1285,7 @@ test.addTest('Variable days: Russian public holidays. Republic of Ingushetia', [ [ '2014.10.04 00:00', '2014.10.05 00:00', false, 'Курбан-байрам' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], // local -], 1000 * 60 * 60 * 24 * (14 + 3), 0, false, nominatimTestJSON_russia_ingushetia, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 3), 0, false, nominatim_by_loc.ru_ingushetia, 'not last test'); test.addTest('Variable days: Russian public holidays. Karachay-Cherkess Republic', [ 'PH', @@ -1523,7 +1307,7 @@ test.addTest('Variable days: Russian public holidays. Karachay-Cherkess Republic [ '2014.07.28 00:00', '2014.07.29 00:00', false, 'Ураза-байрам' ], [ '2014.10.04 00:00', '2014.10.05 00:00', false, 'Курбан-байрам' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 3), 0, false, nominatimTestJSON_russia_karachayCherkess, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 3), 0, false, nominatim_by_loc.ru_karachay_cherkess, 'not last test'); test.addTest('Variable days: Russian public holidays. Chechen Republic', [ 'PH', @@ -1545,7 +1329,7 @@ test.addTest('Variable days: Russian public holidays. Chechen Republic', [ [ '2014.07.28 00:00', '2014.07.29 00:00', false, 'Ураза-байрам' ], [ '2014.10.04 00:00', '2014.10.05 00:00', false, 'Курбан-байрам' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 3), 0, false, nominatimTestJSON_russia_chechnya, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 3), 0, false, nominatim_by_loc.ru_chechnya, 'not last test'); test.addTest('Variable days: Russian public holidays. Kabardino-Balkar Republic', [ 'PH', @@ -1569,7 +1353,7 @@ test.addTest('Variable days: Russian public holidays. Kabardino-Balkar Republic' [ '2014.09.01 00:00', '2014.09.02 00:00', false, 'День государственности Кабардино-Балкарской Республики' ], [ '2014.10.04 00:00', '2014.10.05 00:00', false, 'Курбан-байрам' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 5), 0, false, nominatimTestJSON_russia_kabardinoBalkaria, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 5), 0, false, nominatim_by_loc.ru_kabardino_balkaria, 'not last test'); test.addTest('Variable days: Russian public holidays. Altai Republic', [ 'PH', @@ -1589,7 +1373,7 @@ test.addTest('Variable days: Russian public holidays. Altai Republic', [ [ '2014.05.09 00:00', '2014.05.10 00:00', false, 'День Победы' ], [ '2014.06.12 00:00', '2014.06.13 00:00', false, 'День России' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 1), 0, false, nominatimTestJSON_russia_altai, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 1), 0, false, nominatim_by_loc.ru_altai, 'not last test'); test.addTest('Variable days: Russian public holidays. Tyva Republic', [ 'PH', @@ -1610,7 +1394,7 @@ test.addTest('Variable days: Russian public holidays. Tyva Republic', [ [ '2014.06.12 00:00', '2014.06.13 00:00', false, 'День России' ], [ '2014.08.15 00:00', '2014.08.16 00:00', false, 'День Республики Тыва' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 2), 0, false, nominatimTestJSON_russia_tyva, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 2), 0, false, nominatim_by_loc.ru_tuva, 'not last test'); test.addTest('Variable days: Russian public holidays. Saratov Oblast', [ 'PH', @@ -1630,7 +1414,7 @@ test.addTest('Variable days: Russian public holidays. Saratov Oblast', [ [ '2014.05.09 00:00', '2014.05.10 00:00', false, 'День Победы' ], [ '2014.06.12 00:00', '2014.06.13 00:00', false, 'День России' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 1), 0, false, nominatimTestJSON_russia_saratov, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 1), 0, false, nominatim_by_loc.ru_saratov, 'not last test'); test.addTest('Variable days: Russian public holidays. Bryansk Oblast', [ 'PH', @@ -1651,7 +1435,7 @@ test.addTest('Variable days: Russian public holidays. Bryansk Oblast', [ [ '2014.06.12 00:00', '2014.06.13 00:00', false, 'День России' ], [ '2014.09.17 00:00', '2014.09.18 00:00', false, 'День освобождения города Брянска' ], [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 2), 0, false, nominatimTestJSON_russia_bryansk, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 2), 0, false, nominatim_by_loc.ru_bryansk, 'not last test'); test.addTest('Variable days: Russian public holidays. Komi Republic', [ 'PH', @@ -1671,7 +1455,7 @@ test.addTest('Variable days: Russian public holidays. Komi Republic', [ [ '2014.06.12 00:00', '2014.06.13 00:00', false, 'День России' ], [ '2014.08.22 00:00', '2014.08.23 00:00', false, 'День Республики Коми' ], // local [ '2014.11.04 00:00', '2014.11.05 00:00', false, 'День народного единства' ], -], 1000 * 60 * 60 * 24 * (14 + 1), 0, false, nominatimTestJSON_russia_komi, 'not last test'); +], 1000 * 60 * 60 * 24 * (14 + 1), 0, false, nominatim_by_loc.ru_komi, 'not last test'); /* }}} */ /* U.S. holidays {{{ */ @@ -1685,7 +1469,7 @@ test.addTest('Variable days: United States common public holidays', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (7 + 0), 0, false, nominatimTestJSON_usa_state_unknown, 'not last test'); +], 1000 * 60 * 60 * 24 * (7 + 0), 0, false, nominatim_by_loc.us_state_unknown, 'not last test'); test.addTest('Variable days: United States public holidays. Alabama', [ 'PH', @@ -1702,7 +1486,7 @@ test.addTest('Variable days: United States public holidays. Alabama', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatimTestJSON_usa_alabama, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatim_by_loc.us_al, 'not last test'); test.addTest('Variable days: United States public holidays. Alaska', [ 'PH', @@ -1718,7 +1502,7 @@ test.addTest('Variable days: United States public holidays. Alaska', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 2 - 1), 0, false, nominatimTestJSON_usa_alaska, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 2 - 1), 0, false, nominatim_by_loc.us_ak, 'not last test'); test.addTest('Variable days: United States public holidays. Arizona', [ 'PH', @@ -1733,7 +1517,7 @@ test.addTest('Variable days: United States public holidays. Arizona', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatimTestJSON_usa_arizona, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatim_by_loc.us_az, 'not last test'); test.addTest('Variable days: United States public holidays. Arkansas', [ 'PH', @@ -1749,7 +1533,7 @@ test.addTest('Variable days: United States public holidays. Arkansas', [ [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.24 00:00', '2014.12.25 00:00', false, "Christmas Eve" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_arkansas, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_ar, 'not last test'); test.addTest('Variable days: United States public holidays. California', [ 'PH', @@ -1765,7 +1549,7 @@ test.addTest('Variable days: United States public holidays. California', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_california, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_ca, 'not last test'); test.addTest('Variable days: United States public holidays. Colorado', [ 'PH', @@ -1780,7 +1564,7 @@ test.addTest('Variable days: United States public holidays. Colorado', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatimTestJSON_usa_colorado, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatim_by_loc.us_co, 'not last test'); test.addTest('Variable days: United States public holidays. Connecticut', [ 'PH', @@ -1797,7 +1581,7 @@ test.addTest('Variable days: United States public holidays. Connecticut', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatimTestJSON_usa_connecticut, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatim_by_loc.us_ct, 'not last test'); test.addTest('Variable days: United States public holidays. Delaware', [ 'PH', @@ -1814,7 +1598,7 @@ test.addTest('Variable days: United States public holidays. Delaware', [ [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.11.28 00:00', '2014.11.29 00:00', false, "Day After Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatimTestJSON_usa_delaware, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatim_by_loc.us_de, 'not last test'); test.addTest('Variable days: United States public holidays. District of Columbia', [ 'PH', @@ -1830,7 +1614,7 @@ test.addTest('Variable days: United States public holidays. District of Columbia [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_washingtondc, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_dc, 'not last test'); test.addTest('Variable days: United States public holidays. Florida', [ 'PH', @@ -1844,7 +1628,7 @@ test.addTest('Variable days: United States public holidays. Florida', [ [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.11.28 00:00', '2014.11.29 00:00', false, "Friday after Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 - 1), 0, false, nominatimTestJSON_usa_florida, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 - 1), 0, false, nominatim_by_loc.us_fl, 'not last test'); test.addTest('Variable days: United States public holidays. Georgia', [ 'PH', @@ -1861,7 +1645,7 @@ test.addTest('Variable days: United States public holidays. Georgia', [ [ '2014.11.28 00:00', '2014.11.29 00:00', false, "Robert E. Lee's Birthday" ], [ '2014.12.24 00:00', '2014.12.25 00:00', false, "Washington's Birthday" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 3 - 1), 0, false, nominatimTestJSON_usa_georgia, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 3 - 1), 0, false, nominatim_by_loc.us_ga, 'not last test'); test.addTest('Variable days: United States public holidays. Guam', [ 'PH', @@ -1881,7 +1665,7 @@ test.addTest('Variable days: United States public holidays. Guam', [ [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.08 00:00', '2014.12.09 00:00', false, "Lady of Camarin Day" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 5), 0, false, nominatimTestJSON_usa_guam, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 5), 0, false, nominatim_by_loc.us_gu, 'not last test'); test.addTest('Variable days: United States public holidays. Hawaii', [ 'PH', @@ -1899,7 +1683,7 @@ test.addTest('Variable days: United States public holidays. Hawaii', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 4 - 1), 0, false, nominatimTestJSON_usa_hawaii, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 4 - 1), 0, false, nominatim_by_loc.us_hi, 'not last test'); test.addTest('Variable days: United States public holidays. Idaho', [ 'PH', @@ -1914,7 +1698,7 @@ test.addTest('Variable days: United States public holidays. Idaho', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatimTestJSON_usa_idaho, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatim_by_loc.us_id, 'not last test'); test.addTest('Variable days: United States public holidays. Illinois', [ 'PH', @@ -1932,7 +1716,7 @@ test.addTest('Variable days: United States public holidays. Illinois', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 3), 0, false, nominatimTestJSON_usa_illinois, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 3), 0, false, nominatim_by_loc.us_il, 'not last test'); test.addTest('Variable days: United States public holidays. Indiana', [ 'PH', @@ -1951,7 +1735,7 @@ test.addTest('Variable days: United States public holidays. Indiana', [ [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.11.28 00:00', '2014.11.29 00:00', false, "Lincoln's Birthday" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 4), 0, false, nominatimTestJSON_usa_indiana, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 4), 0, false, nominatim_by_loc.us_in, 'not last test'); test.addTest('Variable days: United States public holidays. Iowa', [ 'PH', @@ -1967,7 +1751,7 @@ test.addTest('Variable days: United States public holidays. Iowa', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_iowa, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_ia, 'not last test'); test.addTest('Variable days: United States public holidays. Kansas', [ 'PH', @@ -1982,7 +1766,7 @@ test.addTest('Variable days: United States public holidays. Kansas', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatimTestJSON_usa_kansas, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatim_by_loc.us_ks, 'not last test'); test.addTest('Variable days: United States public holidays. Kentucky', [ 'PH', @@ -2000,7 +1784,7 @@ test.addTest('Variable days: United States public holidays. Kentucky', [ [ '2014.12.24 00:00', '2014.12.25 00:00', false, "Christmas Eve" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], [ '2014.12.31 00:00', '2015.01.01 00:00', false, "New Year's Eve" ], -], 1000 * 60 * 60 * 24 * (10 + 3), 0, false, nominatimTestJSON_usa_kentucky, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 3), 0, false, nominatim_by_loc.us_ky, 'not last test'); test.addTest('Variable days: United States public holidays. Louisiana', [ 'PH', @@ -2018,7 +1802,7 @@ test.addTest('Variable days: United States public holidays. Louisiana', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 3), 0, false, nominatimTestJSON_usa_louisiana, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 3), 0, false, nominatim_by_loc.us_la, 'not last test'); test.addTest('Variable days: United States public holidays. Maine', [ 'PH', @@ -2034,7 +1818,7 @@ test.addTest('Variable days: United States public holidays. Maine', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_maine, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_me, 'not last test'); test.addTest('Variable days: United States public holidays. Maryland', [ 'PH', @@ -2050,7 +1834,7 @@ test.addTest('Variable days: United States public holidays. Maryland', [ [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.11.28 00:00', '2014.11.29 00:00', false, "Native American Heritage Day" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_maryland, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_md, 'not last test'); test.addTest('Variable days: United States public holidays. Massachusetts', [ 'PH', @@ -2066,7 +1850,7 @@ test.addTest('Variable days: United States public holidays. Massachusetts', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_massachusetts, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_ma, 'not last test'); test.addTest('Variable days: United States public holidays. Michigan', [ 'PH', @@ -2083,7 +1867,7 @@ test.addTest('Variable days: United States public holidays. Michigan', [ [ '2014.12.24 00:00', '2014.12.25 00:00', false, "Christmas Eve" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], [ '2014.12.31 00:00', '2015.01.01 00:00', false, "New Year's Eve" ], -], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatimTestJSON_usa_michigan, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatim_by_loc.us_mi, 'not last test'); test.addTest('Variable days: United States public holidays. Minnesota', [ 'PH', @@ -2098,7 +1882,7 @@ test.addTest('Variable days: United States public holidays. Minnesota', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatimTestJSON_usa_minnesota, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatim_by_loc.us_mn, 'not last test'); test.addTest('Variable days: United States public holidays. Mississippi', [ 'PH', @@ -2114,7 +1898,7 @@ test.addTest('Variable days: United States public holidays. Mississippi', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_mississippi, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_ms, 'not last test'); test.addTest('Variable days: United States public holidays. Missouri', [ 'PH', @@ -2130,7 +1914,7 @@ test.addTest('Variable days: United States public holidays. Missouri', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_missouri, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_mo, 'not last test'); test.addTest('Variable days: United States public holidays. Montana', [ 'PH', @@ -2148,7 +1932,7 @@ test.addTest('Variable days: United States public holidays. Montana', [ [ '2014.12.24 00:00', '2014.12.25 00:00', false, "Christmas Eve" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], [ '2014.12.31 00:00', '2015.01.01 00:00', false, "New Year's Eve" ], -], 1000 * 60 * 60 * 24 * (10 + 3), 0, false, nominatimTestJSON_usa_montana, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 3), 0, false, nominatim_by_loc.us_mt, 'not last test'); test.addTest('Variable days: United States public holidays. Nebraska', [ 'PH', @@ -2164,7 +1948,7 @@ test.addTest('Variable days: United States public holidays. Nebraska', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_nebraska, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_ne, 'not last test'); test.addTest('Variable days: United States public holidays. Nevada', [ 'PH', @@ -2180,7 +1964,7 @@ test.addTest('Variable days: United States public holidays. Nevada', [ [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.11.28 00:00', '2014.11.29 00:00', false, "Family Day" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 2 - 1), 0, false, nominatimTestJSON_usa_nevada, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 2 - 1), 0, false, nominatim_by_loc.us_nv, 'not last test'); test.addTest('Variable days: United States public holidays. New Hampshire', [ 'PH', @@ -2197,7 +1981,7 @@ test.addTest('Variable days: United States public holidays. New Hampshire', [ [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.11.28 00:00', '2014.11.29 00:00', false, "Day after Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatimTestJSON_usa_newhampshire, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatim_by_loc.us_nh, 'not last test'); test.addTest('Variable days: United States public holidays. New Jersey', [ 'PH', @@ -2215,7 +1999,7 @@ test.addTest('Variable days: United States public holidays. New Jersey', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 3), 0, false, nominatimTestJSON_usa_newjersey, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 3), 0, false, nominatim_by_loc.us_nj, 'not last test'); test.addTest('Variable days: United States public holidays. New Mexico', [ 'PH', @@ -2230,7 +2014,7 @@ test.addTest('Variable days: United States public holidays. New Mexico', [ [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.11.28 00:00', '2014.11.29 00:00', false, "Day after Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1 - 1), 0, false, nominatimTestJSON_usa_newmexico, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1 - 1), 0, false, nominatim_by_loc.us_nm, 'not last test'); test.addTest('Variable days: United States public holidays. New York', [ 'PH', @@ -2247,7 +2031,7 @@ test.addTest('Variable days: United States public holidays. New York', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatimTestJSON_usa_newyork, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatim_by_loc.us_ny, 'not last test'); test.addTest('Variable days: United States public holidays. North Carolina', [ 'PH', @@ -2266,7 +2050,7 @@ test.addTest('Variable days: United States public holidays. North Carolina', [ [ '2014.12.24 00:00', '2014.12.25 00:00', false, "Christmas Eve" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], [ '2014.12.26 00:00', '2014.12.27 00:00', false, "Day after Christmas" ], -], 1000 * 60 * 60 * 24 * (10 + 4), 0, false, nominatimTestJSON_usa_northcarolina, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 4), 0, false, nominatim_by_loc.us_nc, 'not last test'); test.addTest('Variable days: United States public holidays. Ohio', [ 'PH', @@ -2281,7 +2065,7 @@ test.addTest('Variable days: United States public holidays. Ohio', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatimTestJSON_usa_ohio, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatim_by_loc.us_oh, 'not last test'); test.addTest('Variable days: United States public holidays. Oklahoma', [ 'PH', @@ -2297,7 +2081,7 @@ test.addTest('Variable days: United States public holidays. Oklahoma', [ [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.11.28 00:00', '2014.11.29 00:00', false, "Day after Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_oklahoma, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_ok, 'not last test'); test.addTest('Variable days: United States public holidays. Oregon', [ 'PH', @@ -2312,7 +2096,7 @@ test.addTest('Variable days: United States public holidays. Oregon', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatimTestJSON_usa_oregon, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatim_by_loc.us_or, 'not last test'); test.addTest('Variable days: United States public holidays. Pennsylvania', [ 'PH', @@ -2328,7 +2112,7 @@ test.addTest('Variable days: United States public holidays. Pennsylvania', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_pennsylvania, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_pa, 'not last test'); test.addTest('Variable days: United States public holidays. Puerto Rico', [ 'PH', @@ -2352,7 +2136,7 @@ test.addTest('Variable days: United States public holidays. Puerto Rico', [ [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Día de Acción de Gracias" ], [ '2014.12.24 00:00', '2014.12.25 00:00', false, "Noche Buena" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Día de Navidad" ], -], 1000 * 60 * 60 * 24 * (10 + 9), 0, false, nominatimTestJSON_usa_puertorico, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 9), 0, false, nominatim_by_loc.us_pr, 'not last test'); test.addTest('Variable days: United States public holidays. Rhode Island', [ 'PH', @@ -2368,7 +2152,7 @@ test.addTest('Variable days: United States public holidays. Rhode Island', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_rhodeisland, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_ri, 'not last test'); test.addTest('Variable days: United States public holidays. South Carolina', [ 'PH', @@ -2384,7 +2168,7 @@ test.addTest('Variable days: United States public holidays. South Carolina', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_southcarolina, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_sc, 'not last test'); test.addTest('Variable days: United States public holidays. South Dakota', [ 'PH', @@ -2399,7 +2183,7 @@ test.addTest('Variable days: United States public holidays. South Dakota', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatimTestJSON_usa_southdakota, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatim_by_loc.us_sd, 'not last test'); test.addTest('Variable days: United States public holidays. Tennessee', [ 'PH', @@ -2416,7 +2200,7 @@ test.addTest('Variable days: United States public holidays. Tennessee', [ [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.24 00:00', '2014.12.25 00:00', false, "Christmas Eve" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatimTestJSON_usa_tennessee, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatim_by_loc.us_tn, 'not last test'); test.addTest('Variable days: United States public holidays. Texas', [ 'PH', @@ -2434,7 +2218,7 @@ test.addTest('Variable days: United States public holidays. Texas', [ [ '2014.12.24 00:00', '2014.12.25 00:00', false, "Christmas Eve" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], [ '2014.12.26 00:00', '2014.12.27 00:00', false, "Day after Christmas" ], -], 1000 * 60 * 60 * 24 * (10 + 3), 0, false, nominatimTestJSON_usa_texas, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 3), 0, false, nominatim_by_loc.us_tx, 'not last test'); test.addTest('Variable days: United States public holidays. United States Virgin Islands', [ 'PH', @@ -2460,7 +2244,7 @@ test.addTest('Variable days: United States public holidays. United States Virgin [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], [ '2014.12.26 00:00', '2014.12.27 00:00', false, "Christmas Second Day" ], [ '2014.12.31 00:00', '2015.01.01 00:00', false, "New Year's Eve" ], -], 1000 * 60 * 60 * 24 * (10 + 11), 0, false, nominatimTestJSON_usa_virginislands, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 11), 0, false, nominatim_by_loc.us_vi, 'not last test'); test.addTest('Variable days: United States public holidays. Utah', [ 'PH', @@ -2476,7 +2260,7 @@ test.addTest('Variable days: United States public holidays. Utah', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_utah, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_ut, 'not last test'); test.addTest('Variable days: United States public holidays. Vermont', [ 'PH', @@ -2493,7 +2277,7 @@ test.addTest('Variable days: United States public holidays. Vermont', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatimTestJSON_usa_vermont, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatim_by_loc.us_vt, 'not last test'); test.addTest('Variable days: United States public holidays. Virginia', [ 'PH', @@ -2509,7 +2293,7 @@ test.addTest('Variable days: United States public holidays. Virginia', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatimTestJSON_usa_virginia, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 1), 0, false, nominatim_by_loc.us_va, 'not last test'); test.addTest('Variable days: United States public holidays. Washington', [ 'PH', @@ -2524,7 +2308,7 @@ test.addTest('Variable days: United States public holidays. Washington', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatimTestJSON_usa_washington, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatim_by_loc.us_wa, 'not last test'); test.addTest('Variable days: United States public holidays. West Virginia', [ 'PH', @@ -2541,7 +2325,7 @@ test.addTest('Variable days: United States public holidays. West Virginia', [ [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.11.28 00:00', '2014.11.29 00:00', false, "Lincoln's Day" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatimTestJSON_usa_westvirginia, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatim_by_loc.us_wv, 'not last test'); test.addTest('Variable days: United States public holidays. Wisconsin', [ 'PH', @@ -2558,7 +2342,7 @@ test.addTest('Variable days: United States public holidays. Wisconsin', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatimTestJSON_usa_wisconsin, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 2), 0, false, nominatim_by_loc.us_wi, 'not last test'); test.addTest('Variable days: United States public holidays. Wyoming', [ 'PH', @@ -2573,7 +2357,7 @@ test.addTest('Variable days: United States public holidays. Wyoming', [ [ '2014.11.11 00:00', '2014.11.12 00:00', false, "Veterans Day" ], [ '2014.11.27 00:00', '2014.11.28 00:00', false, "Thanksgiving" ], [ '2014.12.25 00:00', '2014.12.26 00:00', false, "Christmas Day" ], -], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatimTestJSON_usa_wyoming, 'not last test'); +], 1000 * 60 * 60 * 24 * (10 + 0), 0, false, nominatim_by_loc.us_wy, 'not last test'); /* }}} */ /* Czech holidays {{{ */ @@ -2593,7 +2377,7 @@ test.addTest('Variable days: Czech Republic public holidays.', [ [ '2015.12.24 00:00', '2015.12.25 00:00', false, "Štědrý den" ], [ '2015.12.25 00:00', '2015.12.26 00:00', false, "1. svátek vánoční" ], [ '2015.12.26 00:00', '2015.12.27 00:00', false, "2. svátek vánoční" ], -], 1000 * 60 * 60 * 24 * (13 + 0), 0, false, nominatimTestJSON_czechRepublic, 'not last test'); +], 1000 * 60 * 60 * 24 * (13 + 0), 0, false, nominatim_by_loc.cz, 'not last test'); /* }}} */ /* Swedish holidays {{{ */ @@ -2612,21 +2396,21 @@ test.addTest('Variable days: Swedish public holidays.', [ [ '2015.10.31 00:00', '2015.11.01 00:00', false, 'alla helgons dag' ], [ '2015.12.25 00:00', '2015.12.26 00:00', false, 'juldagen' ], [ '2015.12.26 00:00', '2015.12.27 00:00', false, 'annandag jul' ], -], 1000 * 60 * 60 * 24 * 12, 0, false, nominatim_for_loc.se._se, 'not last test'); +], 1000 * 60 * 60 * 24 * 12, 0, false, nominatim_by_loc.se, 'not last test'); test.addTest('Variable days: Weekday in given week.', [ 'PH', ], '2016.06.10 0:00', '2016.11.31 23:59', [ [ '2016.06.25 00:00', '2016.06.26 00:00', false, 'midsommardagen' ], [ '2016.11.05 00:00', '2016.11.06 00:00', false, 'alla helgons dag' ], -], 1000 * 60 * 60 * 24 * 2, 0, false, nominatim_for_loc.se._se, 'not last test'); +], 1000 * 60 * 60 * 24 * 2, 0, false, nominatim_by_loc.se, 'not last test'); test.addTest('Variable days: Weekday in given week.', [ 'PH', ], '2017.06.10 0:00', '2017.11.31 23:59', [ [ '2017.06.24 00:00', '2017.06.25 00:00', false, 'midsommardagen' ], [ '2017.11.04 00:00', '2017.11.05 00:00', false, 'alla helgons dag' ], -], 1000 * 60 * 60 * 24 * 2, 0, false, nominatim_for_loc.se._se, 'not last test'); +], 1000 * 60 * 60 * 24 * 2, 0, false, nominatim_by_loc.se, 'not last test'); /* }}} */ @@ -2710,7 +2494,7 @@ test.addTest('Full range', [ 'Mo 00:00-24:00; Tu 00:00-24:00; We 00:00-24:00; Th 00:00-24:00; Fr 00:00-24:00; Sa 00:00-24:00; Su 00:00-24:00', ], '2012.10.01 0:00', '2012.10.08 0:00', [ [ '2012.10.01 0:00', '2012.10.08 0:00' ], - ], 1000 * 60 * 60 * 24 * 7, 0, true, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * 7, 0, true, nominatim_default, 'not only test'); test.addTest('24/7 as time interval alias (don’t use 24/7 as showen here)', [ 'Mo,We 00:00-24:00', // preferred because more explicit @@ -2901,7 +2685,7 @@ test.addTest('Fallback group rules', [ [ '2013.10.05 09:00', '2013.10.05 13:00' ], // Sa [ '2013.10.07 08:00', '2013.10.07 12:00' ], // Mo [ '2013.10.07 14:00', '2013.10.07 18:00' ], - ], 1000 * 60 * 60 * ((4 * 8 + 4) + (2 + 2 + (6 + 6))), 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * ((4 * 8 + 4) + (2 + 2 + (6 + 6))), 0, false, nominatim_default, 'not last test'); // example from Netzwolf test.addTest('Fallback group rules', [ @@ -2918,7 +2702,7 @@ test.addTest('Fallback group rules', [ [ '2013.10.04 12:00', '2013.10.04 13:00', false, 'Emergency only' ], [ '2013.10.05 12:00', '2013.10.05 13:00', false, 'Emergency only' ], [ '2013.10.07 08:00', '2013.10.07 11:00' ], - ], 1000 * 60 * 60 * (3 * 5 + 3 * 1), 0, true, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * (3 * 5 + 3 * 1), 0, true, nominatim_default, 'not last test'); test.addTest('Fallback group rules, with some closed times', [ 'Mo,Tu,Th 09:00-12:00; Fr 14:00-17:30 || "Termine nach Vereinbarung"; We off', @@ -3788,7 +3572,7 @@ test.addTest('Complex example used in README', [ [ '2012.10.06 14:30', '2012.10.07 08:30' ], [ '2012.10.07 09:00', '2012.10.07 14:00' ], [ '2012.10.07 14:30', '2012.10.08 00:00' ], - ], 1000 * 60 * 60 * (24 * 7 - 5 - 0.5 * 6 - 0.5 * 6), 0, false, nominatimTestJSON, 'not last test', { 'warnings_severity': 7 }); + ], 1000 * 60 * 60 * (24 * 7 - 5 - 0.5 * 6 - 0.5 * 6), 0, false, nominatim_default, 'not last test', { 'warnings_severity': 7 }); test.addTest('Complex example used in README and benchmark', [ value_perfectly_valid[0], // preferred because shorter @@ -3816,7 +3600,7 @@ test.addTest('Complex example used in README and benchmark', [ [ '2012.10.27 12:00', '2012.10.27 17:00' ], [ '2012.10.29 12:00', '2012.10.29 18:00' ], [ '2012.10.30 12:00', '2012.10.30 18:00' ], - ], 1000 * 60 * 60 * (6 * 16 + 5 * 5), 0, false, nominatimTestJSON, 'not last test', { 'warnings_severity': 7 }); + ], 1000 * 60 * 60 * (6 * 16 + 5 * 5), 0, false, nominatim_default, 'not last test', { 'warnings_severity': 7 }); test.addTest('Warnings corrected to additional rule (real world example)', [ 'Mo-Fr 09:00-12:00, Mo,Tu,Th 15:00-18:00', // reference value for prettify @@ -3893,7 +3677,7 @@ test.addTest('Real world example: Was not processed right (month range/monthday [ '2014.09.18 18:00', '2014.09.19 04:00', true, 'Specified as open end. Closing time was guessed.' ], [ '2014.09.19 18:00', '2014.09.20 04:00', true, 'Specified as open end. Closing time was guessed.' ], [ '2014.09.20 18:00', '2014.09.21 00:00', true, 'Specified as open end. Closing time was guessed.' ], - ], 0, 1000 * 60 * 60 * (4 + (6 + 4) * 5 + 6), false, nominatimTestJSON, 'not only test'); + ], 0, 1000 * 60 * 60 * (4 + (6 + 4) * 5 + 6), false, nominatim_default, 'not only test'); test.addTest('Real world example: Was not processed right (month range/monthday range)', [ // 'Tu-Th 12:00-14:00; SH off; Mo-Sa 18:00+', @@ -3920,7 +3704,7 @@ test.addTest('Real world example: Was not processed right (month range/monthday [ '2014.09.18 18:00', '2014.09.19 04:00', true, 'Specified as open end. Closing time was guessed.' ], [ '2014.09.19 18:00', '2014.09.20 04:00', true, 'Specified as open end. Closing time was guessed.' ], [ '2014.09.20 18:00', '2014.09.21 00:00', true, 'Specified as open end. Closing time was guessed.' ], - ], 0, 1000 * 60 * 60 * (17 * (6 + 4) + 6), false, nominatimTestJSON, 'not only test'); + ], 0, 1000 * 60 * 60 * (17 * (6 + 4) + 6), false, nominatim_default, 'not only test'); /* }}} */ /* https://www.openstreetmap.org/node/863426086 {{{ */ @@ -3934,7 +3718,7 @@ test.addTest('Real world example: Was processed right (month range/monthday rang [ '2014.10.03 17:15', '2014.10.04 00:00', false, 'Tag der Deutschen Einheit' ], [ '2014.10.04 00:00', '2014.10.04 01:00' ], [ '2014.10.04 17:15', '2014.10.05 00:00' ], - ], 1000 * 60 * 60 * (1 + (24 - 17.25 + 1) * 4 - 1), 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * (1 + (24 - 17.25 + 1) * 4 - 1), 0, false, nominatim_default, 'not only test'); /* }}} */ /* https://www.openstreetmap.org/node/1754337209/history {{{ */ @@ -4385,7 +4169,7 @@ test.addTest('Real world example: Problem with in ho ], '2015.01.01 0:00', '2015.01.10 0:00', [ [ '2015.01.01 00:00', '2015.01.02 00:00', false, 'Neujahrstag' ], [ '2015.01.06 00:00', '2015.01.07 00:00', false, 'Heilige Drei Könige' ], - ], 1000 * 60 * 60 * 24 * 2, 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * 2, 0, false, nominatim_default, 'not only test'); test.addTest('Real world example: Problem with in holiday parser', [ // 'We off, Mo,Tu,Th-Su,PH, Jun-Aug We 11:00-14:00,17:00+', // Should fail. 'We off; Mo,Tu,Th-Su,PH; Jun-Aug We 11:00-14:00,17:00+', @@ -4400,7 +4184,7 @@ test.addTest('Real world example: Problem with in ho [ '2015.06.03 17:00', '2015.06.04 03:00', true, 'Specified as open end. Closing time was guessed.' ], [ '2015.06.04 03:00', '2015.06.05 00:00', false, 'Fronleichnam' ], // Th [ '2015.06.05 00:00', '2015.06.10 00:00' ], // Fr-Tu: 5 - ], 1000 * 60 * 60 * (24 * (1 + 1 + 6 + 5) + 3 + (24 - 3)), 1000 * 60 * 60 * (24 - 17 + 3), false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * (24 * (1 + 1 + 6 + 5) + 3 + (24 - 3)), 1000 * 60 * 60 * (24 - 17 + 3), false, nominatim_default, 'not last test'); /* }}} */ /* https://github.com/opening-hours/opening_hours.js/issues/87 {{{ */ @@ -4415,13 +4199,13 @@ test.addTest('Real world example: Problem with daylight saving?', [ [ '2015.04.02 15:00', '2015.04.03 00:00' ], // 24-15 [ '2015.04.03 15:00', '2015.04.04 03:00' ], // * 5 [ '2015.04.04 15:00', '2015.04.05 00:00' ], // 24-15 - ], 1000 * 60 * 60 * (3 + 5 * (24-15 + 3) + 2 * (24-15) - 1), 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * (3 + 5 * (24-15 + 3) + 2 * (24-15) - 1), 0, false, nominatim_default, 'not only test'); // }}} /* {{{ https://www.openstreetmap.org/node/3010451545 */ test.addShouldFail('Incorrect syntax which should throw an error', [ 'Mo-Fr 17:00-12:00; Sa-Su 24:00-12:00', // Website, after cleanup and *wrong* am/pm to normal time conversion. - ], nominatimTestJSON, 'not only test'); + ], nominatim_default, 'not only test'); test.addTest('Real world example: Was not processed right', [ 'Mo-Fr 17:00-12:00, Su-Mo 00:00-12:00', // Rewritten and fixed. @@ -4447,7 +4231,7 @@ test.addTest('Variable events', [ [ '2012.04.08 00:00', '2012.04.09 00:00' ], [ '2013.03.31 00:00', '2013.04.01 00:00' ], // daylight saving time [ '2014.04.20 00:00', '2014.04.21 00:00' ], - ], 1000 * 60 * 60 * (24 * 3 - 1), 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * (24 * 3 - 1), 0, false, nominatim_default, 'not last test'); test.addTest('Calculations based on variable events', [ 'easter +1 day open "Easter Monday"', @@ -4455,26 +4239,26 @@ test.addTest('Calculations based on variable events', [ [ '2012.04.09 00:00', '2012.04.10 00:00', false, 'Easter Monday' ], [ '2013.04.01 00:00', '2013.04.02 00:00', false, 'Easter Monday' ], [ '2014.04.21 00:00', '2014.04.22 00:00', false, 'Easter Monday' ], - ], 1000 * 60 * 60 * 24 * 3, 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * 24 * 3, 0, false, nominatim_default, 'not last test'); test.addTest('Calculations based on variable events', [ 'Apr 05-easter -1 day: open "Before easter"', ], '2012.01.01 0:00', '2012.10.08 0:00', [ [ '2012.04.05 00:00', '2012.04.07 00:00', false, 'Before easter' ], - ], 1000 * 60 * 60 * 24 * 2, 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * 2, 0, false, nominatim_default, 'not only test'); test.addTest('Calculations based on variable events', [ 'easter-Apr 20: open "Around easter"', ], '2012.01.01 0:00', '2012.10.08 0:00', [ [ '2012.04.08 00:00', '2012.04.21 00:00', false, 'Around easter' ], - ], 1000 * 60 * 60 * 24 * 13, 0, false, nominatimTestJSON, 'not last test'); + ], 1000 * 60 * 60 * 24 * 13, 0, false, nominatim_default, 'not last test'); test.addTest('Calculations based on variable events', [ 'easter-Apr 02: open "Around easter"', ], '2012.01.01 0:00', '2012.10.08 0:00', [ [ '2012.01.01 00:00', '2012.04.03 00:00', false, 'Around easter' ], [ '2012.04.08 00:00', '2012.10.08 00:00', false, 'Around easter' ], - ], 23842800000, 0, false, nominatimTestJSON, 'not last test'); + ], 23842800000, 0, false, nominatim_default, 'not last test'); test.addTest('Calculations based on variable events', [ '2012 easter -2 days-2012 easter +2 days: open "Around easter"', // Preferred because more explicit (year) and with the colon easier to read. @@ -4482,7 +4266,7 @@ test.addTest('Calculations based on variable events', [ 'easter -2 days-easter +2 days open "Around easter"', ], '2012.01.01 0:00', '2012.10.08 0:00', [ [ '2012.04.06 00:00', '2012.04.10 00:00', false, 'Around easter' ], - ], 1000 * 60 * 60 * 24 * 4, 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * 4, 0, false, nominatim_default, 'not only test'); // }}} // additional rules {{{ @@ -4509,7 +4293,7 @@ test.addTest('Points in time, mode 1', [ [ '2012.10.03 14:00', '2012.10.03 14:01' ], [ '2012.10.04 14:00', '2012.10.04 14:01' ], [ '2012.10.05 14:00', '2012.10.05 14:01' ], - ], 1000 * 60 * 6, 0, true, nominatimTestJSON, 'not last test', 1); + ], 1000 * 60 * 6, 0, true, nominatim_default, 'not last test', 1); test.addTest('Points in time, mode 1', [ 'Mo sunrise,sunset', @@ -4517,7 +4301,7 @@ test.addTest('Points in time, mode 1', [ ], '2012.10.01 0:00', '2012.10.08 0:00', [ [ '2012.10.01 07:22', '2012.10.01 07:23' ], [ '2012.10.01 19:00', '2012.10.01 19:01' ], - ], 1000 * 60 * 2, 0, false, nominatimTestJSON, 'not last test', { 'mode': 1, 'warnings_severity': 0 }); + ], 1000 * 60 * 2, 0, false, nominatim_default, 'not last test', { 'mode': 1, 'warnings_severity': 0 }); // Should not return any warnings. // based on real data which could not be parse: @@ -4537,13 +4321,13 @@ test.addTest('Points in time, mode 2', [ ], '2012.10.01 0:00', '2012.10.08 0:00', [ [ '2012.10.01 07:22', '2012.10.01 07:23' ], [ '2012.10.01 19:00', '2012.10.01 19:01' ], - ], 1000 * 60 * 2, 0, false, nominatimTestJSON, 'not last test', { 'tag_key': 'collection_times' }); + ], 1000 * 60 * 2, 0, false, nominatim_default, 'not last test', { 'tag_key': 'collection_times' }); test.addTest('Points in time, mode 2', [ 'Mo (sunrise+01:00)', ], '2012.10.01 0:00', '2012.10.08 0:00', [ [ '2012.10.01 08:22', '2012.10.01 08:23' ], - ], 1000 * 60 * 1, 0, false, nominatimTestJSON, 'not last test', { 'warnings_severity': 5, 'tag_key': 'collection_times' }); + ], 1000 * 60 * 1, 0, false, nominatim_default, 'not last test', { 'warnings_severity': 5, 'tag_key': 'collection_times' }); // Test for warn_for_PH_missing. test.addTest('Points in time and times ranges, mode 2', [ @@ -4552,7 +4336,7 @@ test.addTest('Points in time and times ranges, mode 2', [ ], '2012.10.01 0:00', '2012.10.08 0:00', [ [ '2012.10.01 12:00', '2012.10.01 12:01' ], [ '2012.10.01 13:00', '2012.10.01 14:00' ], - ], 1000 * 60 * (1 + 60), 0, true, nominatimTestJSON, 'not last test', 2); + ], 1000 * 60 * (1 + 60), 0, true, nominatim_default, 'not last test', 2); // https://github.com/ypid/ComplexAlarm test.addTest('Points in time, extrem example useful for ComplexAlarm', [ @@ -4573,7 +4357,7 @@ test.addTest('Points in time, extrem example useful for ComplexAlarm', [ [ '2014.08.05 08:58', '2014.08.05 08:59', false, 'Sommerferien' ], [ '2014.08.06 08:59', '2014.08.06 09:00', false, 'Sommerferien' ], [ '2014.08.07 09:01', '2014.08.07 09:02', false, 'Sommerferien' ], - ], 1000 * 60 * 14, 0, false, nominatimTestJSON, 'not only test', 1); + ], 1000 * 60 * 14, 0, false, nominatim_default, 'not only test', 1); test.addTest('Points in time, extrem example useful for ComplexAlarm', [ 'Mo-We 07:00; Th,Fr 05:45; Mo[1] 07:30; SH Mo-Fr (sunrise+03:00); PH off', @@ -4583,7 +4367,7 @@ test.addTest('Points in time, extrem example useful for ComplexAlarm', [ [ '2014.05.28 07:00', '2014.05.28 07:01' ], // 29: Christi Himmelfahrt [ '2014.05.30 05:45', '2014.05.30 05:46' ], - ], 1000 * 60 * 4, 0, false, nominatimTestJSON, 'not only test', 1); + ], 1000 * 60 * 4, 0, false, nominatim_default, 'not only test', 1); test.addTest('Points in time, extrem example useful for ComplexAlarm', [ 'Mo-We 07:00; Th 05:45; week 01-53/2 Fr 07:05; week 02-53/2 Fr 05:45; SH Mo-Fr (sunrise+03:00); PH off', @@ -4641,7 +4425,7 @@ test.addTest('Points in time, extrem example useful for ComplexAlarm', [ [ '2014.10.31 05:45', '2014.10.31 05:46' ], // Fr, KW44 // FIXME: Fr: There is no school holiday this day but you will not have to go to school because of "Reformationstag". /* }}} */ - ], 1000 * 60 * 49, 0, false, nominatimTestJSON, 'not only test', 1); + ], 1000 * 60 * 49, 0, false, nominatim_default, 'not only test', 1); test.addTest('Points in time, extrem example useful for ComplexAlarm', [ 'Mo-We 07:00; Th 05:45; week 01-53/2 Fr 07:05; week 02-53/2 Fr 05:45; SH Mo-Fr (sunrise+03:00); PH off; easter -2 days-easter +2 days off "My little break from work every year."; 2014 Sep 01-2014 Sep 07 off "My vacations …"', @@ -4695,7 +4479,7 @@ test.addTest('Points in time, extrem example useful for ComplexAlarm', [ [ '2014.10.31 05:45', '2014.10.31 05:46' ], // Fr, KW44 // FIXME: Fr: There is no school holiday this day but you will not have to go to school because of "Reformationstag". /* }}} */ - ], 1000 * 60 * (49 - 5), 0, false, nominatimTestJSON, 'not only test', 1); + ], 1000 * 60 * (49 - 5), 0, false, nominatim_default, 'not only test', 1); // period times {{{ @@ -4747,7 +4531,7 @@ test.addTest('Points in time, period times with variable times', [ [ '2012.10.01 11:22', '2012.10.01 11:23' ], [ '2012.10.01 13:22', '2012.10.01 13:23' ], [ '2012.10.01 15:22', '2012.10.01 15:23' ], - ], 1000 * 60 * 5, 0, false, nominatimTestJSON, 'not last test', 1); + ], 1000 * 60 * 5, 0, false, nominatim_default, 'not last test', 1); // FIXME test.addTest('Points in time, period times (real world example)', [ @@ -4787,13 +4571,13 @@ test.addTest('Calculations based on month range', [ ignored('Mo-Fr 09:00-12:30; Sa 09:00-13:00; Dec 25-Su-28 days - Dec 24: Mo-Fr 09:00-16:00,Sa 09:00-16:00'), // https://www.openstreetmap.org/node/542882513 ], '2012.01.01 0:00', '2012.10.08 0:00', [ - ], 1000 * 60 * 60 * 24 * 13, 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * 13, 0, false, nominatim_default, 'not only test'); // https://www.openstreetmap.org/node/844696052/history test.addTest('Calculations based on month range', [ ignored('Mo-Su 10:00-01:00; Sep 15+Sa-Oct Su[1],Oct 01-3: Mo-Su 07:30-03:00'), ], '2012.01.01 0:00', '2012.10.08 0:00', [ - ], 1000 * 60 * 60 * 24 * 13, 0, false, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * 13, 0, false, nominatim_default, 'not only test'); // }}} // error tolerance {{{ @@ -4849,7 +4633,7 @@ test.addTest('Error tolerance: Full range', [ 'week 01-53', ], '2012.10.01 0:00', '2012.10.08 0:00', [ [ '2012.10.01 0:00', '2012.10.08 0:00' ], - ], 1000 * 60 * 60 * 24 * 7, 0, true, nominatimTestJSON, 'not only test'); + ], 1000 * 60 * 60 * 24 * 7, 0, true, nominatim_default, 'not only test'); test.addTest('Error tolerance: Full range', [ '24/7', // reference value for prettify @@ -4871,7 +4655,7 @@ test.addTest('Error tolerance: Full range', [ '24 hours 7 days a week', ], '2012.10.01 0:00', '2012.10.08 0:00', [ [ '2012.10.01 0:00', '2012.10.08 0:00' ], - ], 1000 * 60 * 60 * 24 * 7, 0, true, nominatimTestJSON, 'not only test', { 'warnings_severity': 5 } ); + ], 1000 * 60 * 60 * 24 * 7, 0, true, nominatim_default, 'not only test', { 'warnings_severity': 5 } ); // }}} // values which should return a warning {{{ @@ -4968,15 +4752,15 @@ test.addShouldWarn('Value not ideal (probably wrong). Should throw a warning.', // 'Mo 12:00-14:00 und nach Vereinbarung' // Not easily correctable // because of the way error tolerance is implemented. 'We 12:00-18:00,', - ], nominatimTestJSON, 'not only test'); + ], nominatim_default, 'not only test'); test.addShouldWarn('Value not ideal (probably wrong). Should throw a warning. warnings_severity: 5', [ 'Mo-Fr 08:00-16:00', - ], nominatimTestJSON, 'not only test', { 'warnings_severity': 5 }); + ], nominatim_default, 'not only test', { 'warnings_severity': 5 }); test.addShouldWarn('Value not ideal (probably wrong). Should throw a warning. warnings_severity: 5, "tag_key": "opening_hours"', [ 'Mo-Fr 08:00-16:00', - ], nominatimTestJSON, 'not only test', { 'warnings_severity': 5, 'tag_key': 'opening_hours' }); + ], nominatim_default, 'not only test', { 'warnings_severity': 5, 'tag_key': 'opening_hours' }); // }}} // values which should fail during parsing {{{ @@ -5099,7 +4883,7 @@ test.addShouldFail('Incorrect syntax which should throw an error', [ 'Oct 32' + value_suffix, 'Nov 31' + value_suffix, 'Dec 32' + value_suffix, - ], nominatimTestJSON, 'not last test'); + ], nominatim_default, 'not last test'); test.addShouldFail('Missing information (e.g. country or holidays not known to opening_hours.js)', [ 'PH', // country is not specified @@ -5109,11 +4893,11 @@ test.addShouldFail('Missing information (e.g. country or holidays not known to o test.addShouldFail('opening_hours.js is in the wrong mode.', [ 'Mo sunrise,sunset', // only in mode 1 or 2, default is 0 'Mo sunrise-(sunrise+01:00)/60', // only in mode 1 or 2, default is 0 - ], nominatimTestJSON, 'not last test'); + ], nominatim_default, 'not last test'); test.addShouldFail('opening_hours.js is in the wrong mode.', [ 'Mo 12:00-14:00', // only in mode 0 or 2 - ], nominatimTestJSON, 'not last test', 1); + ], nominatim_default, 'not last test', 1); test.addShouldFail('Time range starts outside of the current day for mode === 1.', [ 'Mo-Fr 13:00,15:00,17:45,19:00,24:00; Sa 13:00,24:00; Su 10:00,18:00', @@ -5121,13 +4905,13 @@ test.addShouldFail('Time range starts outside of the current day for mode === 1. 'Mo-Fr 08:00,24:00', 'Mo-Fr 07:00,15:00,24.00; Sa-Su 24:00', 'Mo-Fr 07:00,24.00,15:00; Sa-Su 24:00', - ], nominatimTestJSON, 'not last test', 1); + ], nominatim_default, 'not last test', 1); test.addShouldFail('Time range does not continue as expected for mode === 1.', [ '7.00-', ' mar-nov 12:30-', ' mar-nov 12:30-' + value_suffix, - ], nominatimTestJSON, 'not last test', 1); + ], nominatim_default, 'not last test', 1); test.addShouldFail('Time range does not continue as expected for mode === 2.', [ '7.00-', @@ -5137,7 +4921,7 @@ test.addShouldFail('Time range does not continue as expected for mode === 2.', [ '(' + value_suffix, 'sunrise-(' + value_suffix, 'sunrise-sunset,(' + value_suffix, - ], nominatimTestJSON, 'not last test', 2); + ], nominatim_default, 'not last test', 2); test.addShouldFail('PH with non-existing address.', [ 'Mo-Fr 10:00-20:00; PH off', @@ -5153,7 +4937,7 @@ for (var mode = 0; mode <= 2; mode++) { 'Mon-Sun 14-', '8:am', '8:am; open', - ], nominatimTestJSON, 'not last test', mode); + ], nominatim_default, 'not last test', mode); } for (var mode = 0; mode <= 2; mode++) { @@ -5161,7 +4945,7 @@ for (var mode = 0; mode <= 2; mode++) { 'Su 7:30,10;00,22:00', 'Su 7:30,10?00,22:00', // '?' gets replaced. Not fully supported … FIXME 'Su 7:30,10i00,22:00', - ], nominatimTestJSON, 'not last test', mode); + ], nominatim_default, 'not last test', mode); } // }}} @@ -5169,61 +4953,61 @@ for (var mode = 0; mode <= 2; mode++) { /* Wrong constructor call, e.g bad parameters {{{ */ -test.addShouldFail('Wrong constructor call should throw an error: nominatimJSON: string', [ +test.addShouldFail('Wrong constructor call should throw an error: nominatim_data: string', [ 1, ], {}, 'not only test'); -test.addShouldFail('Wrong constructor call should throw an error: nominatimJSON: string', [ +test.addShouldFail('Wrong constructor call should throw an error: nominatim_data: string', [ 'Mo-Fr 08:00-16:00', ], "I am string!", 'not only test'); test.addShouldFail('Wrong constructor call should throw an error: "string"', [ value_perfectly_valid[0], - ], nominatimTestJSON, 'not only test', 'test for failure'); + ], nominatim_default, 'not only test', 'test for failure'); test.addShouldFail('Wrong constructor call should throw an error: warnings_severity: [ 4 ]', [ value_perfectly_valid[0], - ], nominatimTestJSON, 'not only test', { 'warnings_severity': [ 4 ] }); + ], nominatim_default, 'not only test', { 'warnings_severity': [ 4 ] }); test.addShouldFail('Wrong constructor call should throw an error: warnings_severity: -1', [ value_perfectly_valid[0], - ], nominatimTestJSON, 'not only test', { 'warnings_severity': -1 }); + ], nominatim_default, 'not only test', { 'warnings_severity': -1 }); test.addShouldFail('Wrong constructor call should throw an error: warnings_severity: 4.5', [ value_perfectly_valid[0], - ], nominatimTestJSON, 'not only test', { 'warnings_severity': 4.5 }); + ], nominatim_default, 'not only test', { 'warnings_severity': 4.5 }); test.addShouldFail('Wrong constructor call should throw an error: warnings_severity: 8', [ value_perfectly_valid[0], - ], nominatimTestJSON, 'not only test', { 'warnings_severity': 8 }); + ], nominatim_default, 'not only test', { 'warnings_severity': 8 }); test.addShouldFail('Wrong constructor call should throw an error: mode: [ 1 ]', [ value_perfectly_valid[0], - ], nominatimTestJSON, 'not only test', { 'mode': [ 1 ] }); + ], nominatim_default, 'not only test', { 'mode': [ 1 ] }); test.addShouldFail('Wrong constructor call should throw an error: mode: -1', [ value_perfectly_valid[0], - ], nominatimTestJSON, 'not only test', { 'mode': -1 }); + ], nominatim_default, 'not only test', { 'mode': -1 }); test.addShouldFail('Wrong constructor call should throw an error: mode: 1.5', [ value_perfectly_valid[0], - ], nominatimTestJSON, 'not only test', { 'mode': 1.5 }); + ], nominatim_default, 'not only test', { 'mode': 1.5 }); test.addShouldFail('Wrong constructor call should throw an error: mode: 4', [ value_perfectly_valid[0], - ], nominatimTestJSON, 'not only test', { 'mode': 4 }); + ], nominatim_default, 'not only test', { 'mode': 4 }); test.addShouldFail('Wrong constructor call should throw an error: tag_key: [ "lit" ]', [ value_perfectly_valid[0], - ], nominatimTestJSON, 'not only test', { 'tag_key': [ 'lit' ] }); + ], nominatim_default, 'not only test', { 'tag_key': [ 'lit' ] }); test.addShouldFail('Wrong constructor call should throw an error: map_value: [ "lit" ]', [ value_perfectly_valid[0], - ], nominatimTestJSON, 'not only test', { 'map_value': [ 'lit' ] }); + ], nominatim_default, 'not only test', { 'map_value': [ 'lit' ] }); test.addShouldFail('Wrong constructor call should throw an error: map_value, no tag_key', [ value_perfectly_valid[0], - ], nominatimTestJSON, 'not only test', { 'map_value': true, }); + ], nominatim_default, 'not only test', { 'map_value': true, }); /* }}} */ @@ -5390,11 +5174,11 @@ function opening_hours_test() { this.runSingleTestShouldFail = function(test_data_object) { /* {{{ */ var name = test_data_object[0], value = test_data_object[1], - nominatimJSON = test_data_object[2], + nominatim_data = test_data_object[2], oh_mode = test_data_object[3]; try { - // Since they should fail anyway we can give them the nominatimTestJSON. - oh = new opening_hours(value, nominatimJSON, oh_mode); + // Since they should fail anyway we can give them the nominatim_default. + oh = new opening_hours(value, nominatim_data, oh_mode); crashed = false; } catch (err) { @@ -5428,7 +5212,7 @@ function opening_hours_test() { this.runSingleTestShouldThrowWarning = function(test_data_object) { /* {{{ */ var name = test_data_object[0], value = test_data_object[1], - nominatimJSON = test_data_object[2], + nominatim_data = test_data_object[2], oh_mode = test_data_object[3]; var ignored = typeof value !== 'string'; if (ignored) { @@ -5439,7 +5223,7 @@ function opening_hours_test() { var warnings, oh; try { - oh = new opening_hours(value, nominatimJSON, oh_mode); + oh = new opening_hours(value, nominatim_data, oh_mode); warnings = oh.getWarnings(); crashed = false; @@ -5486,7 +5270,7 @@ function opening_hours_test() { expected_intervals = test_data_object[5], expected_durations = test_data_object[6], expected_weekstable = test_data_object[7], - nominatimJSON = test_data_object[8], + nominatim_data = test_data_object[8], oh_mode = test_data_object[9]; // fix from and to dates @@ -5508,7 +5292,7 @@ function opening_hours_test() { var warnings; try { - oh = new opening_hours(value, nominatimJSON, oh_mode); + oh = new opening_hours(value, nominatim_data, oh_mode); warnings = oh.getWarnings(); @@ -5550,7 +5334,7 @@ function opening_hours_test() { if (this.extensive_testing && !crashed) { - var oh = new opening_hours(value, nominatimJSON, oh_mode); + var oh = new opening_hours(value, nominatim_data, oh_mode); for (var move_date = expected_from; move_date.getTime() < expected_to.getTime(); move_date.setHours(move_date.getHours() + 1)) { var is_open = oh.getState(move_date); @@ -5633,11 +5417,11 @@ function opening_hours_test() { value = test_data_object[1], point_in_time = test_data_object[2], expected_matching_rule = test_data_object[3], - nominatimJSON = test_data_object[4]; + nominatim_data = test_data_object[4]; var matching_rule, matching_rule_ok; try { - // since they should fail anyway we can give them the nominatimTestJSON - oh = new opening_hours(value, nominatimJSON); + // since they should fail anyway we can give them the nominatim_default + oh = new opening_hours(value, nominatim_data); it = oh.getIterator(new Date(point_in_time)); matching_rule = oh.prettifyValue({ rule_index: it.getMatchingRule() }); @@ -5676,7 +5460,7 @@ function opening_hours_test() { expected_prettified_value = test_data_object[3]; var prettify_value_ok; try { - oh = new opening_hours(value, nominatimTestJSON); + oh = new opening_hours(value, nominatim_default); prettified_value = oh.prettifyValue({ 'conf': { 'locale': prettify_locale } }); prettify_value_ok = prettified_value === expected_prettified_value; @@ -5716,8 +5500,8 @@ function opening_hours_test() { var crashed = true; var actual_result; try { - first_oh = new opening_hours(first_value, nominatimTestJSON); - second_oh = new opening_hours(second_value, nominatimTestJSON); + first_oh = new opening_hours(first_value, nominatim_default); + second_oh = new opening_hours(second_value, nominatim_default); actual_result = first_oh.isEqualTo(second_oh, new Date('Sat Oct 17 2015 18:20:29 GMT+0200 (CEST)')); @@ -5820,7 +5604,7 @@ function opening_hours_test() { // }}} // add normal test queue {{{ - this.addTest = function(name, values, from, to, expected_intervals, expected_duration, expected_unknown_duration, expected_weekstable, nominatimJSON, last, oh_mode) { + this.addTest = function(name, values, from, to, expected_intervals, expected_duration, expected_unknown_duration, expected_weekstable, nominatim_data, last, oh_mode) { if (this.last === true) return; this.handle_only_test(last); @@ -5835,16 +5619,16 @@ function opening_hours_test() { } if (typeof values === 'string') tests.push([name, values, values, from, to, expected_intervals, - [ expected_duration, expected_unknown_duration ], expected_weekstable, nominatimJSON, oh_mode]); + [ expected_duration, expected_unknown_duration ], expected_weekstable, nominatim_data, oh_mode]); else for (var value_ind = 0; value_ind < values.length; value_ind++) this.tests.push([name, values[value_ind], values[0], from, to, expected_intervals, - [ expected_duration, expected_unknown_duration ], expected_weekstable, nominatimJSON, oh_mode]); + [ expected_duration, expected_unknown_duration ], expected_weekstable, nominatim_data, oh_mode]); }; // }}} // add test which should fail {{{ - this.addShouldFail = function(name, values, nominatimJSON, last, oh_mode) { + this.addShouldFail = function(name, values, nominatim_data, last, oh_mode) { if (this.last === true) { return; } @@ -5853,15 +5637,15 @@ function opening_hours_test() { oh_mode = get_oh_mode_parameter(oh_mode); if (typeof values === 'string') - this.tests_should_fail.push([name, values, nominatimJSON, oh_mode]); + this.tests_should_fail.push([name, values, nominatim_data, oh_mode]); else for (var value_ind = 0; value_ind < values.length; value_ind++) - this.tests_should_fail.push([name, values[value_ind], nominatimJSON, oh_mode]); + this.tests_should_fail.push([name, values[value_ind], nominatim_data, oh_mode]); }; // }}} // add test which should give a warning {{{ - this.addShouldWarn = function(name, values, nominatimJSON, last, oh_mode) { + this.addShouldWarn = function(name, values, nominatim_data, last, oh_mode) { if (this.last === true) { return; } @@ -5870,25 +5654,25 @@ function opening_hours_test() { oh_mode = get_oh_mode_parameter(oh_mode); if (typeof values === 'string') - this.tests_should_warn.push([name, values, nominatimJSON, oh_mode]); + this.tests_should_warn.push([name, values, nominatim_data, oh_mode]); else for (var value_ind = 0; value_ind < values.length; value_ind++) - this.tests_should_warn.push([name, values[value_ind], nominatimJSON, oh_mode]); + this.tests_should_warn.push([name, values[value_ind], nominatim_data, oh_mode]); }; // }}} // add test to check if the matching rule is evaluated correctly {{{ - this.addCompMatchingRule = function(name, values, date, matching_rule, nominatimJSON, last) { + this.addCompMatchingRule = function(name, values, date, matching_rule, nominatim_data, last) { if (this.last === true) { return; } this.handle_only_test(last); if (typeof values === 'string') - this.tests_comp_matching_rule.push([name, values, date, matching_rule, nominatimJSON]); + this.tests_comp_matching_rule.push([name, values, date, matching_rule, nominatim_data]); else for (var value_ind = 0; value_ind < values.length; value_ind++) - this.tests_comp_matching_rule.push([name, values[value_ind], date, matching_rule, nominatimJSON]); + this.tests_comp_matching_rule.push([name, values[value_ind], date, matching_rule, nominatim_data]); }; // }}} @@ -6004,8 +5788,8 @@ function opening_hours_test() { } }; // }}} - // }}} } +// }}} // Public helper functions. {{{ function ignored(value, reason) { @@ -6014,5 +5798,4 @@ function ignored(value, reason) { return [ value, reason ]; } // }}} -// }}} // vim: set ts=4 sw=4 tw=78 et :