From: "jeremyevans0 (Jeremy Evans) via ruby-core" Date: 2025-04-15T05:02:18+00:00 Subject: [ruby-core:121662] [Ruby Feature#21264] Extract Date library from Ruby repo in the future Issue #21264 has been updated by jeremyevans0 (Jeremy Evans). hsbt (Hiroshi SHIBATA) wrote in #note-3: > >If we are going to remove stdlib Date, I would also prefer that Date be a core class instead of demoted to bundled gems. A large number of Ruby libraries and applications need Date functionality. > > Do you mean make all feature of Date class to core class? I prefer @zverok 's idea that is "simplified" version of Date. I am also OK with a simplified version of `Date`. I believe the main potential opportunities for simplification are: * Always assume the Gregorian calendar (no support for date of calendar reform) * Only store civil dates (year, month, day) * Either no support for julian/ordinal/commercial dates (my preference) * or calculate them every time they are requested 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. Having the simplified version as a new class allows for gradual code conversion. We could also release a gem that backported the simplified `Date` for older Ruby versions, to allow code supporting older Ruby versions to work and accelerate ecosystem conversion to simplified `Date`. The gem would be a no-op on a Ruby version that included the simplified `Date`. The downsides of a new class is it would likely require changes to code that could potentially work without changes, and it would be uglier. ---------------------------------------- Feature #21264: Extract Date library from Ruby repo in the future https://bugs.ruby-lang.org/issues/21264#change-112716 * 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/