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

react-localized-time

v0.0.2

Published

This is a component to display time translated to the user's timezone.

Readme

react-localized-time

This is a component to display time translated to the user's timezone.

At its simplest, you can use it like this:

import { LocalizedTime } from "react-localized-time";

//...

<p>
  Gatsby Days starts at{" "}
  <LocalizedTime dateTime="1 June 2020 09:00 PST">9am PST</LocalizedTime>
</p>;

The dateTime prop accepts any text that can be parsed by the Date constructor. (These formats are RFC 2822 and ISO8601).

The component renders the dateTime value, transalted into the user's timezone and locale. By default the value is appended to the existing content of the tag, separated by " / ", so the example above would render as "Gatsby Days starts at 9am PST / 18:00 BST" in the UK.

Props

The component renders a <time> element, and accepts and passes-through any valid <time> props.

dateTime: boolean

A date/time string in RFC 2822 or ISO8601 format. It must include a date as well as time so that it can calculate daylight sdaving time.

append?: boolean

Whether the value should be appended to the existing content of the tag. Default: true

options?:Intl.DateTimeFormatOptions`

Options that are passed to the formatter. For valid options see DateTimeFormat.

Default:

{
  hour: "numeric",
  minute: "numeric",
  timeZoneName: "short",
}

locale?: string

You may specify a locale for the display, or leave as undefined which will use the user's locale. This does not affect the timezone, just the format.

separator?: string

If you are using the append option, this is the string that will be used to separate the two times. Default: " / "