Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new grunt task data:timezones to create list of timezones, with an additional info: countryMap. #161

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 57 additions & 1 deletion contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,63 @@ Pack each zone in `data/unpacked/2014d.json` and save in `data/packed/2014d.json
"America/Phoenix|MST MDT MWT|70 60 60|01010202010|-261r0 1nX0 11B0 1nX0 SgN0 4Al1 Ap0 1db0 SWqX 1cL0"
```

### 7. Build tests for each zone.
### 7. Exract list of Zones & Countries meta data

```
grunt data-meta:2014d
```

This task creates a JSON file containing list of timezones and countries. The extracted meta data can be used to list all timezones, list all countries and filter zones by a country etc.

The output is saved in `data/meta/timezones-list-{version}.json`

Sample output:

```
{
"countries": {
"AD": {
"name": "Andorra",
"abbr": "AD",
"zones": [
"Europe/Andorra"
]
},
"AE": {
"name": "United Arab Emirates",
"abbr": "AE",
"zones": [
"Asia/Dubai"
]
},
...
},
"zones": {
"Europe/Andorra": {
"name": "Europe/Andorra",
"lat": 42.5,
"long": 1.5167,
"countries": [
"AD"
],
"comments": ""
},
"Asia/Dubai": {
"name": "Asia/Dubai",
"lat": 25.3,
"long": 55.3,
"countries": [
"AE",
"OM"
],
"comments": ""
},
...
}
}
```

### 8. Build tests for each zone.

```
grunt data-tests
Expand Down
Loading