npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@11ty/parse-date-strings

v2.0.6

Published

Parsing content date strings in Eleventy core.

Downloads

1,782

Readme

@11ty/parse-date-strings

Features:

  • Zero dependency super minimal RFC 9557-compatible date parsing library. Date strings are also parseable by Temporal.PlainDate.from, Temporal.Instant.from, or Temporal.PlainDateTime.from to prepare for wider Temporal API support.
  • Invalid strings throw errors.
  • Time zone notes:
    • Defaults to UTC when time zone is unknown (not local time). This matches previous behavior in Eleventy and this feature maintains consistency between build and deploy servers.
    • Supports +00, +00:00, -00, or -00:00 style time zone offsets (: delimiter is optional)
  • Delimiter notes:
    • Requires a T or t or (space) delimiter with DateTime strings
    • Delimiters in dates (-) and times (:) are optional

Not supported (for RFC 9557 compatibility):

  • Standalone time formats are not supported (must be Date or DateTime)
  • ISO week date syntax is not supported (e.g. YYYY-W01-1)
  • Day of year syntax is not supported (e.g. YYYY-001, YYYY-365)
  • Fractional hours or minutes (e.g. T14.6 or T10:30.6) are not supported. Fractional seconds (e.g. milliseconds) are supported (of course).

Usage

npm install @11ty/parse-date-strings
import { parse } from "@11ty/parse-date-strings

// `parse` returns JavaScript Date

parse("2000-01-01") instanceof Date
// true

parse("2000-01-01").toUTCString()
// "Mon, 01 Jan 2001 00:00:00 GMT"

Comparisons

luxon

More strict parsing compared with Luxon’s fromISO (used in Eleventy v0.x through v3):

2016-05-25
20160525
2016-05-25T09
2016-05-25T09:24
2016-05-25T09:24:15
2016-05-25T09:24:15.123
2016-05-25T0924
2016-05-25T092415
2016-05-25T092415.123
2016-05-25T09:24:15,123

# No YYYY or YYYYMM syntax
2016                      # Dropped
2016-05                   # Dropped
201605                    # Dropped

# No ISO week date syntax
2016-W21-3                # Dropped
2016W213                  # Dropped
2016-W21-3T09:24:15.123   # Dropped
2016W213T09:24:15.123     # Dropped

# No day of year syntax (e.g. 200th day of the year)
2016-200                  # Dropped
2016200                   # Dropped
2016-200T09:24:15.123     # Dropped

# No implied current day (time-only syntax)
09:24                     # Dropped
09:24:15                  # Dropped
09:24:15.123              # Dropped
09:24:15,123              # Dropped