Project

General

Profile

Actions

Misc #13072

closed

Current state of date standard library

Added by zverok (Victor Shepelev) over 7 years ago. Updated about 1 year ago.

Status:
Closed
Assignee:
-
[ruby-core:78832]

Description

The facts that I've been able to gather (not supported by links, so please forgive me if I am misquoting/misunderstanding):

  • date library was initially developed and maintained by Tadayoshi Funaba, who was the "single point of truth" for its design and features;
  • for at least year, initial creator/maintainer of the library is inactive in Ruby community, so library mostly considered unmaintained;
  • as far as I can "sense"/guess from ticket responses about the library, the core team doesn't see it as crucial/important to maintain.

At the same time, the library provides:

  • Widely and extensively used Date class;
  • Pretty controversial DateTime class, which has a huge feature intersection but almost no compatibility with core Time class;
  • Date parsing functionality (Date._parse), which is also used by lib/time.

The latter also leads to a really confusing situation, where one of the core Ruby classes has "optional additional functionality" in stdlib.

Overall, the situation looks pretty "dirty" (as in "dirty code"), and seems like needing improvement.

WDYT about this plan (for Ruby 2.5, for ex.):

  • make Date and Date._parse parts of language core (with probably renaming _parse to something more readable, or even extracting something like Date::Parser module);
  • merge DateTime and Time (while preferring Times interface where possible);
  • on the way, gather all requests/bugs from this tracker, related to dates and times parsing, representing and so on.

Related issues 3 (1 open2 closed)

Related to Ruby master - Feature #5481: Gemifying Ruby standard libraryClosedhsbt (Hiroshi SHIBATA)Actions
Related to Ruby master - Feature #13183: Gemify dateClosedhsbt (Hiroshi SHIBATA)Actions
Related to Ruby master - Feature #14274: Merge Std-Lib Time Class into CoreOpenActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0