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

Generate smaller bundle options with limited timezone data #73

Merged
merged 9 commits into from
Jun 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Changelog

### next

* produce smaller builds containing a more limited set of timezone data
* updated to iana tzdb 2019a

### 2.0.2

* updated to iana tzdb 2018g
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ Install joda using npm
.toString() // 2016-06-30T11:30-04:00[America/New_York]
</script>

## Reducing js-joda-timezone file size
If you don't need all the historical data that js-joda-timezone provides, you can instead use one of the reduced files ize builds:

* `js-joda-timezone-10-year-range.js` covers +- five years from the current version's release
* `js-joda-timezone-1970-2030.js` covers from 1970 to 2030
* `js-joda-timezone-2012-2022.js` covers from 2012 to 2022

To use one of these, just change your import path to the following format:

import 'js-joda-timezone/dist/js-joda-timezone-1970-2030'

## Implementation details

* This ZoneRulesProvider implemantion supplies all functionality that is required by the js-joda package.
Expand All @@ -86,6 +97,6 @@ Install joda using npm

* The author of joda time and the lead architect of the JSR-310 is Stephen Colebourne.

* The packed json version of the iana tzdb is imported from [moment-timezone](https://github.com/moment/moment-timezone) package.
* The json versions of the iana tzdb are imported from and generated with [moment-timezone](https://github.com/moment/moment-timezone).


600 changes: 600 additions & 0 deletions data/packed/2018h.json

Large diffs are not rendered by default.

600 changes: 600 additions & 0 deletions data/packed/2018i.json

Large diffs are not rendered by default.

600 changes: 600 additions & 0 deletions data/packed/2019a.json

Large diffs are not rendered by default.

600 changes: 600 additions & 0 deletions data/packed/latest-10-year-range.json

Large diffs are not rendered by default.

600 changes: 600 additions & 0 deletions data/packed/latest-1970-2030.json

Large diffs are not rendered by default.

600 changes: 600 additions & 0 deletions data/packed/latest-2012-2022.json

Large diffs are not rendered by default.

53 changes: 27 additions & 26 deletions data/packed/latest.json

Large diffs are not rendered by default.