XDate is a lightweight JavaScript date library released circa 2013, designed as a thin wrapper around the native `Date` object to provide enhanced functionality for parsing, formatting, and manipulating dates. It aims for familiarity by implementing many of the same methods as the native `Date` object and is non-destructive to the DOM, making it safe for inclusion in third-party libraries. The current stable version is 0.8.3, but the package is explicitly no longer actively maintained. The original author recommends migrating to `temporal-polyfill`, which implements the modern JavaScript Temporal API standard, as a direct replacement. Given its deprecated status, XDate does not have an active release cadence and lacks modern JavaScript features like native ESM support.
npm install xdateVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of XDate, including creating, manipulating, formatting, and differencing dates using its CommonJS interface. Also highlights the deprecated status.
Migrate to `temporal-polyfill` or another actively maintained modern date library. The original author explicitly recommends `temporal-polyfill`.
Always use `const XDate = require('xdate');` for importing XDate. If your project is pure ESM, consider moving to a modern, ESM-compatible date library like `temporal-polyfill`.For applications requiring accurate and robust date/time handling, especially across timezones and DST, migrate to `temporal-polyfill` or other battle-tested, actively maintained date libraries that adhere to current standards.
Ensure you are using the CommonJS `require` syntax: `const XDate = require('xdate');`. If your project is an ES Module, you will need to re-evaluate if XDate is appropriate or migrate to an ESM-compatible date library.Verify that XDate is imported as a default CommonJS export: `const XDate = require('xdate');`. Ensure no named imports are being attempted.This issue is inherent to the library's deprecated status. The most robust fix is to migrate to a modern, actively maintained date/time library that correctly implements current specifications for date arithmetic and timezone handling, such as `temporal-polyfill`.
No dependency data recorded yet.