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

Remove luxon #508

Merged
merged 6 commits into from
Jun 5, 2022
Merged

Remove luxon #508

merged 6 commits into from
Jun 5, 2022

Conversation

davidgoli
Copy link
Collaborator

@davidgoli davidgoli commented Jun 5, 2022

Addresses #501

Note it is now possible to avoid using any 3rd party dependency, since browser support for the Intl API is now fairly widespread.

@codecov-commenter
Copy link

codecov-commenter commented Jun 5, 2022

Codecov Report

Merging #508 (a6f6602) into master (17268f4) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #508      +/-   ##
==========================================
- Coverage   88.50%   88.49%   -0.02%     
==========================================
  Files          29       29              
  Lines        2097     2094       -3     
  Branches      584      584              
==========================================
- Hits         1856     1853       -3     
  Misses        241      241              
Impacted Files Coverage Δ
src/datewithzone.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17268f4...a6f6602. Read the comment docs.

@@ -35,8 +35,6 @@ Alternatively, download manually:

* [rrule.min.js](https://jakubroztocil.github.io/rrule/dist/es5/rrule.min.js) (bundled, minified)
* [rrule.js](https://jakubroztocil.github.io/rrule/dist/es5/rrule.js) (bundled, not minified)
* [rrule-tz.min.js](https://jakubroztocil.github.io/rrule/dist/es5/rrule-tz.min.js) (with timezone support, bundled, minified)
* [rrule-tz.js](https://jakubroztocil.github.io/rrule/dist/es5/rrule-tz.js) (with timezone support, bundled, not minified)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are projects loading from these github.io urls, for example using a <script> tag in an html file, this change will break those projects. I recommend we make a copy of rrule.min.js and rrule.js to rrule-tz.min.js and rrule-tz.js and continue to place them under dist folder.
But on the other hand, I don't know can we push users of these 2 files to switch. If we do not want to keep provide these files forever, eventually we need to stop and whenever we stop, it will break some body, so why not break it now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope nobody is linking directly to these files in a production app! It would be a very bad idea, since they're not versioned and can change unpredictably. Thus, I think it's a good idea to discourage that use case. These files are for direct download only. I would support removing even these links, and encourage everyone to just use npm as the source of truth for the package, but I think that's out of scope for this PR.

@sunshineo
Copy link
Contributor

sunshineo commented Jun 5, 2022

In README, there is still a reference to luxon and example
https://github.com/jakubroztocil/rrule/blob/remove-luxon/README.md?plain=1#L193

@davidgoli
Copy link
Collaborator Author

I chose to leave the Luxon reference in the README, since it's mentioned only as an example of a library that can be used to manipulate dates & time zones. Other packages eg. date-fns & day.js could just as easily work in place of Luxon to achieve the same result. I don't think it's necessary for this package's README to give examples in every possible Date library, so I think it's acceptable to leave a single example in an arbitrary package, in this case Luxon.

@cmmash
Copy link

cmmash commented Sep 29, 2023

So does this mean I can do this:
dtstart = 2010-01-01T10:00:00 (10am in my local tz)
tz = Asia/Kolkata
interval = 1
frequency = monthly

And the occurrences returned will be like this:
2010-01-01T10:00:00
2010-02-01T10:00:00
2010-03-01T10:00:00

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

Successfully merging this pull request may close these issues.

4 participants