A Node.js package for parsing PostgreSQL interval strings and converting the result back to formats like Postgres interval strings or ISO 8601 duration strings. Useful when you need to interpret Postgres interval output (assuming the default Postgres interval style) and then pass the parsed value into applications or prepared statements.
Project status
- The repository appears actively maintained currently, with an upstream push on 2026-06-30 and a new
v4.1.0update on 2026-06-30 that adds an API method (interval.toTemporalDuration()) and updates CI for newer Node.js versions. - The update cadence looks intermittent, with the previous documented update
v4.0.2dated 2024-01-29 and thenv4.1.0in 2026-06-30, indicating a multi-month to multi-year gap between updates rather than continuous releases.
AI summary generated
Recent updates
v4.1.0
Release v4.1.0 has no provided release notes. The code and docs changes introduce a new API method, interval.toTemporalDuration(), and update CI to test against newer Node.js versions.
BreakingFeaturesv4.0.2
Release v4.0.2 makes a small internal change to how fractional seconds are converted into milliseconds in the interval parser. The accompanying test suite adds coverage for fractional second strings with leading zeros and varying digit counts.
v4.0.1
Release v4.0.1 was published on 2023-06-29, but the publisher did not provide any release notes. Because no documented changes are available, developers should review the repository diff and changelog/history to identify potential API, behavior, or dependency updates before upgrading.
v4.0.0
This release is tagged v4.0.0, but no release notes were provided by the publisher. As a result, there is not enough information to identify new features, breaking changes, bug fixes, security updates, performance improvements, or migration/dependency changes from the release notes alone.
v3.0.0
v3.0.0 refactors the core interval parsing logic in index.js, adds an exposed static parse method, and tightens the parsing behavior with a new regular expression and rounding rules for milliseconds. The release also updates project tooling for modern CI and raises the supported Node.js runtime in package.json.
BreakingFeaturesv2.1.0
v2.1.0 adds a new ISO 8601 “short” formatter for Postgres interval objects and expands the test suite around ISO string formatting. The implementation also tweaks the internal ISO assembly logic (including zero and empty-part handling) and updates TypeScript typings accordingly. No publisher release notes were provided to confirm what changed.
Featuresv2.0.0
Release notes for v2.0.0 were not provided by the publisher. The code changes indicate a v1 to v2 refactor that affects parsing and formatting behavior, TypeScript typings, and supported Node.js versions. The most important behavioral change is that interval fields are now always initialized to numeric zero values and toPostgres omits zero-valued units.
v1.2.0
v1.2.0 adds a new `PostgresInterval` method, `toISOString()`, which is implemented as an alias of the existing `toISO()` behavior. The implementation also tightens the interval time parsing regex around fractional seconds, which changes what interval strings are considered valid. No release notes were provided, so these changes are not described there.
Breakingv1.1.2
Release v1.1.2 includes a small behavioral change to how Postgres interval fractional seconds are serialized, plus the addition of TypeScript type definitions. The release notes are missing, so the only authoritative information about changes comes from the diff.
Featuresv1.1.1
v1.1.1 contains small behavior changes to how PostgresInterval formats fractional seconds and how it interprets negative fractional-second inputs. No release notes were provided, so the changes below are inferred directly from the code diff and updated tests.
Featuresv1.1.0
No release notes were provided for v1.1.0, so there is no documented information about new features, bug fixes, or compatibility changes. Because the release notes are missing, developers should review the corresponding commit diff or changelog in the repository before upgrading to assess potential impact.