react-timestamp
Advanced tools
Comparing version
{ | ||
"name": "react-timestamp", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "A React component for displaying a datetime in the local timezone", | ||
@@ -5,0 +5,0 @@ "main": "lib/timestamp.js", |
@@ -20,8 +20,16 @@ # Timestamp | ||
<Timestamp time={thing.created_at} /> | ||
<Timestamp time="2015-10-10 10:30:00" format='short' /> | ||
<Timestamp time="2015-10-10 10:30:00" format='full' /> | ||
<Timestamp time="1450663457" /> | ||
``` | ||
Format options are: | ||
* 'ago' (default) - 2 hours ago | ||
* 'full' - 10 Oct 2015, 4:32pm | ||
* 'date' - 10 Oct 2015 | ||
* 'time' - 4:32pm | ||
# Testing | ||
`npm test` |
9031
1.82%34
30.77%