New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-pure-time

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-pure-time

React pure time component which format date and time

latest
Source
npmnpm
Version
0.2.8
Version published
Maintainers
1
Created
Source

react-pure-time npm package Build Status Dependency Status

React component which convert js date object, milliseconds to human readable format

Features

  • very small
  • UTC support
  • no external dependencies

Usage

import Time from 'react-pure-time';
<Time value="1990-06-16 13:22:17" format="d.m.Y H:i:s" />

Options

value: [string, number, instanceOf(Date)]

Date object, milliseconds or string

format: string

Default: 'd.m.Y H:i'

php standart time/date formatting. PHP date format manual

utc: bool

Default: false

Show in UTC timezone

placeholder: string

Default: —

Shows when date is incorrect or empty

className: string

Just a wrapper class

Can be used with values

ValueFormatTime componentwith utc flag
Empty value
Empty value with placeholderno time definedno time defined
1261322332312H:i:s17:18:5215:18:52
new Date(1261322332312)d.m.Y H:i:s20.12.2009 17:18:5220.12.2009 15:18:52
new Date()d.m.Y H:i:s08.05.2016 16:22:2308.05.2016 13:22:23
1990-06-16 13:22:17d.m.Y H:i:s16.06.1990 13:22:1716.06.1990 10:22:17
September 2, 2003, 2:26 amd.m.Y H:i:s02.09.2003 02:26:0001.09.2003 23:26:00
2003 36 2003d.m.Y H:i:s

Keywords

react

FAQs

Package last updated on 19 Apr 2023

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