ps://bugs.ruby-lang.org/issues/21264 • There have been no primary maintainers for the date library and the datetime library for over 10 years. • Maintaining the date library and the datetime library are becoming a burden for Ruby commi tt ers.
for the date library and the datetime library • The Date class will be deprecated. • Instead, a simpli fi ed The Date class will be created. • Move the Date class into a core class. • Keep the current situation.
for the date library and the datetime library • The Date class will be deprecated. • Instead, a simpli fi ed The Date class will be created. • Move the Date class into a core class. • Currently, there are no major problems, so Ruby commi tt ers will continue with maintenance that only involves version updates. How did I approach this challenge?
• Moving away from date library: • Decoupling DateTime from Date. • Moving `Time.parse` to the time library to decouple it from date library. • strptime issue.
• Moving away from date library: • Decoupling DateTime from Date. -> DateTime is already deprecated, so no major action is required. • Moving `Time.parse` to the time library to decouple it from date library. -> Since `Time.parse` internally calls `Date._parse`, we should port the equivalent of `Date._parse` into the time library. • strptime issue. -> The current implementation is slightly biased toward date, so it should be made more neutral and compact, assuming Time.
ps://bugs.ruby-lang.org/issues/21616 • date library will be deprecated. • Porting `Date._parse` to time library. • Porting `Date.strptime` to time library.
the date library • Should we implement a part of Date's functionality (or a similar independent function) in Time? • If Time can handle dates, how does it di ff er from the already deprecated DateTime?
the date library • Should we implement a part of Date's functionality (or a similar independent function) in Time? • If Time can handle dates, how does it di ff er from the already deprecated DateTime? My thoughts are wandering in a labyrinth.
before the closing of the RubyKaigi 2026 CFP • Development of RubyDate is complete. • Until the end of March 2026 • Date rewriting complete. • Until the end of March 2027
plan • Used an AI agent • Started by porting ruby/date/ext/date/date_core.c. • Implemented it by referring to the behavior described in the usage comments. • Ported some of the tests from ruby/date/test/date/test_date.rb, and then had an AI agent write the rest of the tests. • Development environment • 4.1-dev • Ubuntu 24.04 LTS
causes • Tests that had been partially ported from test_date.rb were somehow deleted by the AI agent. • The AI agent was only adding tests that passed the logic it had implemented.
causes • Tests that had been partially ported from test_date.rb were somehow deleted by the AI agent. • The AI agent was only adding tests that passed the logic it had implemented. • All test code under ruby/date/test/date has been moved to ruby_date. • Only the tests in test_date.rb have been fi xed to pass.
for a Clean Slate • AI agents boosted development speed more than I ever imagined. • Working with AI agents gave me a much higher resolution of how date works.
Implementation Approach • The Rules for AI agent: • Zero changes to tests. (Maintain the ground truth) • Target: 85%+ performance of C extension. • The Process: • Identify bo tt lenecks method by method. • Apply micro-optimizations.
Implementation Approach • The Rules for AI agent: • Zero changes to tests. (Maintain the ground truth) • Target: 85%+ performance of C extension. • The Process: • Identify bo tt lenecks method by method. • Apply micro-optimizations. These optimizations didn't move the needle as much as I expected.
Implementation Approach • The Rules for AI agent: • Zero changes to tests. (Maintain the ground truth) • Target: 85%+ performance of C extension. • The Process: • Identify bo tt lenecks method by method. • Apply micro-optimizations. And then, I arrived at a single truth.
Jinroq would like to avoid deprecating the date library. • However, it's easier said than done. • AI agents enable us to build products with incredible speed. • Therefore, there is no compelling reason to wait. • AI agents are powerful partners, but NEVER our masters. • We MUST remain accountable for what we build.