Back to Explore

d3/d3-time

GitHub
1 watchersOpen source

Last release:

d3-time is a JavaScript module that provides an API for calendar math, designed to handle irregularities in conventional time units such as varying month lengths, leap years, and daylight saving time changes. It is useful for developers who need to compute dates and time intervals correctly across these real-world edge cases.

Project status

  • The source (d3-time) shows no recent updates close to 2026-10-02, with the last upstream push on 2024-06-03 and the newest listed update v3.1.0 dated 2022-12-03, suggesting it is not actively maintained in the present timeframe.
  • Update cadence appears infrequent, with gaps of roughly 2 years between v3.0.0 (2021-06-05) and v3.1.0 (2022-12-03), and no evidence of newer updates after 2024-06-03.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v3.1.0

    v3.1.0 adds the new unixDay and unixDays time interval helpers, and updates d3.utcTicks to use unixDay instead of utcDay to improve tick spacing consistency. The code refactor also consolidates multiple UTC interval implementations (minute, hour, day, week, month, year) into the corresponding local interval modules and rewires exports accordingly.

    Features
  • v3.0.0

    v3.0.0 is a packaging release that switches the package to ECMAScript modules and raises the minimum supported Node.js version. The code diff also shows additional changes beyond the release notes, including entry point resolution changes via an added exports map, a dependency range update for d3-array, and internal tooling migrations (tests, lint, CI).

    Breaking
  • v2.1.1

    v2.1.1 is a small patch release focused on preventing a crash when tick intervals are invalid. The code now guards against a null/invalid interval object so tick generation does not throw, and documentation is updated to describe null return behavior for utc tick intervals.

  • v2.1.0

    v2.1.0 adds new time tick generators to d3-time, including utcTicks/timeTicks and utcTickInterval/timeTickInterval. The release also updates dependencies. The code diff shows these new APIs are implemented via a new src/ticks.js module that relies on d3-array’s bisector and tickStep.

    Features
  • v2.0.0

    v2.0.0 updates d3-time to align with ES2015, including dropping support for older browsers such as IE. The code diff is small, with the main functional source change in src/day.js and some documentation and tooling-related updates.

    Breaking
  • v1.1.0

    v1.1.0 introduces shorthand interval functions that default to the current time when the date argument is omitted (for example, timeDay()). It also marks the package as side-effect free (sideEffects: false) and updates build tooling and metadata.

    BreakingFeatures
  • v1.0.11

    Release v1.0.11 is described as a fix to d3-time’s timeMinute and timeHour behavior for historical timestamps. The code changes update the internal interval alignment logic in src/hour.js and src/minute.js, and also include a modification in src/second.js even though it is not mentioned in the release notes.

  • v1.0.10

    Release v1.0.10 contains minimal release note text (“Housekeeping”), but the actual changes touch the package entry points and build configuration. The code diff primarily updates how the library is packaged and how the source entry file is located for bundling and distribution.

  • v1.0.9

    v1.0.9 primarily changes the build and packaging setup for d3-time (moving from a build/ output to dist/, and switching minification tooling). The release notes only say "Update dependencies", but the diff shows concrete changes to npm entry points and publish scripts.

    Breaking
  • v1.0.8

    v1.0.8 updates d3-time to address a pathological case where interval.range could fail to terminate. The release notes mention protecting against infinite loops in interval.range, and the code diff shows a new termination condition to detect lack of progress during iteration.