0.2.8 • Published 1 year ago

react-pure-time v0.2.8

Weekly downloads
11
License
ISC
Repository
github
Last release
1 year ago

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
0.2.8

1 year ago

0.2.7

2 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.3

3 years ago

0.2.2

6 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago