Socket
Socket
Sign inDemoInstall

react-moment

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-moment

React component for the moment date library.


Version published
Weekly downloads
146K
increased by2.71%
Maintainers
1
Weekly downloads
 
Created

What is react-moment?

The react-moment npm package is a React component for the Moment.js library, which allows you to easily format, parse, and manipulate dates and times in your React applications.

What are react-moment's main functionalities?

Formatting Dates

This feature allows you to format dates in various ways. In this example, the date will be formatted as 'YYYY/MM/DD'.

<Moment format='YYYY/MM/DD'>{dateToFormat}</Moment>

Relative Time

This feature allows you to display dates in a relative format, such as 'a few seconds ago' or 'in 3 days'.

<Moment fromNow>{dateToFormat}</Moment>

Unix Timestamps

This feature allows you to convert Unix timestamps to human-readable dates.

<Moment unix>{unixTimestamp}</Moment>

Custom Calendar Time

This feature allows you to display dates in a custom calendar format, such as 'Today at 2:30 PM' or 'Last Monday at 4:00 PM'.

<Moment calendar>{dateToFormat}</Moment>

Duration

This feature allows you to display durations in a specified format, such as 'hh:mm:ss'.

<Moment duration={duration} format='hh:mm:ss'/>

Other packages similar to react-moment

Keywords

FAQs

Package last updated on 09 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc