From: "zverok (Victor Shepelev) via ruby-core" Date: 2025-04-15T06:05:56+00:00 Subject: [ruby-core:121663] [Ruby Feature#21264] Extract Date library from Ruby repo in the future Issue #21264 has been updated by zverok (Victor Shepelev). > I think an important question is whether the simplified Date should be ::Date, or something like ::Time::Date. One issue with making the simplified version ::Date is it opens up backwards compatibility issues for code that uses features removed in the simplification. I am afraid that `::Time::Date` approach is mostly doomed. Assuming you have many instances of `Date` usage in the codebase (including some not-so-obvious ones, like `const_get` and deserialization), and the new Ruby version says there is this change, and you have two options: 1. `require 'date'` (the bundled "old Date") and everything works 2. replace everything with `::Time::Date` People will inevitably mostly choose option 1. OTOH, the whole point of simplification is "almost nobody uses some parts of Date, so it is not reasonable to keep them in core/maintain". So, if the new simplified class would be just `::Date`, some _very small_ amount of code will break (if it is not so, the Date shouldn't be simplified). For this case, I'd say 1. We might consider a bundled `date` library to extend the core (new) `Date` class with missing functionality (like stdlib `time` does)... 2. And only if it turns out to be definitely impossible (due to incompatible internal representation), some new name might be introduced. ---------------------------------------- Feature #21264: Extract Date library from Ruby repo in the future https://bugs.ruby-lang.org/issues/21264#change-112717 * Author: hsbt (Hiroshi SHIBATA) * Status: Open ---------------------------------------- Note: This is not for Ruby 3.5. `Date` and `DateTime` has no primary maintainer in 10+ years. I would like to deprecate `date` via bundled gems for reducing our maintenance time especially @nobu. But `Time.prase` and `Time.strptime` are widely used now. How do we deprecate `date` library? 1. Migrate `Date._strptime`, `Date.strptime` and `Date._parse` to `Time`. The current `Date` is migrated as bundled gems. 2. Migrate `Date` to the bundled gems. `Time.parse` and `Time.strptime` warns if `date` is not found. 3. Keep the current situation 4. ... Does anyone have another idea? -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/