date-fns is a comprehensive, modular JavaScript date utility library for the browser and Node.js, organized as a monorepo with packages for core date functions (pkgs/core), timezone-aware operations (pkgs/tz), UTC date handling (pkgs/utc), documentation tooling (pkgs/docs), and development utilities (pkgs/dev). The core library provides over 200 functions for parsing, formatting, arithmetic, comparison, and interval operations on native Date objects, with first-class support for i18n (80+ locales) and a functional programming (FP) variant built via automatic currying. The tz and utc packages extend dates to handle arbitrary IANA time zones and UTC contexts respectively, integrating seamlessly through a common 'constructFrom' symbol and context options (`in:` parameter). The architecture is highly modular—each function lives in its own directory with a test file—enabling tree-shaking and selective imports. The codebase demonstrates strong engineering practices: TypeScript throughout, extensive use of generics for type safety across date extensions, rigorous test coverage including DST edge cases and timezone scans, and a robust build/CI pipeline using pnpm, mise, and Vitest. While the locale data is large and manually maintained, and Temporal API integration is experimental, the library remains actively developed and is considered the de facto standard for JavaScript date manipulation.
This repository is a highly configurable, feature-rich React date picker component library published as `react-datepicker`. It provides a single entry point (`DatePicker`) that supports single date, date range, multiple dates, week, month, quarter, and year picker modes, along with time selection, timezone handling, localization via `date-fns`, and extensive keyboard navigation and ARIA accessibility. Internally, the library uses a class-component architecture with a clear separation of concerns: a `Calendar` component manages month/year navigation, `Month` renders days or month/quarter grids, `Day` handles individual cell rendering with selection and focus management, and `Time`/`InputTime` handle time input. Positioning of the calendar popover is delegated to `@floating-ui/react` via a `withFloating` HOC, and rendering can be redirected to a portal (including shadow DOM) for overlay scenarios. The component exposes over 60 props for customization, including custom input elements, headers, and day rendering. The library is mature and widely adopted, with a comprehensive test suite (Jest + React Testing Library) covering interactions, keyboard navigation, edge cases, and accessibility (axe tests). The build pipeline uses Rollup to produce UMD, CJS, and ES module bundles, and CSS is provided in both standard and CSS Modules variants.