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

Change year range for data file to 2013-2023 #614

Closed
Schnark opened this issue May 9, 2018 · 8 comments
Closed

Change year range for data file to 2013-2023 #614

Schnark opened this issue May 9, 2018 · 8 comments
Assignees

Comments

@Schnark
Copy link

Schnark commented May 9, 2018

Currently, there is a file moment-timezone-with-data-2012-2022.js for those who want a smaller data file with only currently relevant data. For 2018 this range should be changed to 2013-2023, as it is supposed to be "current year +/-5 years" (previous change on this was 83e81ef).

@aadityakulkarni
Copy link

Hi @Schnark I have created a PR for this issue. But the build failed. Can someone please help me fix this build issue?

@andrewpanfelsherpa
Copy link

Referencing #363 (comment) , would it be possible to rename the file to something like "moment-timezone-with-data-truncated.js" so that the path doesn't need to continually change?

@mattjohnsonpint mattjohnsonpint self-assigned this Apr 16, 2019
@mattjohnsonpint
Copy link
Contributor

mattjohnsonpint commented Apr 16, 2019

Thinking about this more, I believe the correct way to handle this is to do all of the following:

  • Keep publishing the 2012-2022 file. When we last changed from 2010-2020, a lot of folks were suddenly broken. Don't want to repeat that.

  • Start publishing multiple other files:

    • 2013-2023 - should have done this last year. My bad.
    • 2014-2024 - this is where we should be now.
    • 10-year-range - this should be always updated and floating (+/- 5 years). Most users can take this one and the path won't continually change.
    • 1970-2030 - this range is much smaller than the "full" data, and seems to be prefered way to handle New data file size. #697 based on comments there.

I'll pick this up for the next release, coming shortly.

@mattjohnsonpint
Copy link
Contributor

Actually, I see no reason to publish older year range files. We'll keep 2012-2022 intact, and add a 1970-2030 and a 5-year rolling file.

@mattjohnsonpint
Copy link
Contributor

This is completed in version 0.5.24. Thanks.

@MatthewHerbst
Copy link

@mj1856 how does one use the new smaller file (1970-2030)?

@andrewpanfelsherpa
Copy link

@MatthewHerbst For example, in my project:

import Moment from "moment";
import MomentTZ from "moment-timezone/builds/moment-timezone-with-data-10-year-range";

Basically, the build contains the moment-timezone library and the data for the date ranges, and can be substituted for the normal moment-timezone + data import.

More information can be found in the documentation: http://momentjs.com/timezone/docs/

@MatthewHerbst
Copy link

Thanks @andrewpanfelsherpa!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants