Welcome aboard! We are happy you are here and wish you good net-raft!
// you must install npm i react-relative-time
import React from 'react'
import RelativeTime from 'react-relative-time'
class App extends React.Component {
render() {
let yourDate = new Date("Wed Apr 18 2018 15:48:59 GMT+0400")
return (
<div>
<p><RelativeTime value={yourDate} titleFormat="YYYY/MM/DD HH:mm" /></p>
</div>
)
}
}
export default App;
The most helpful REACT solutions
How to get client ip address using react ?REACT
Click to see more ...
19.6K
421
how to get the type of a device using react ?REACT
Click to see more ...
2.4K
220
create digital clock reactREACT
Click to see more ...
1.8K
141
country dropdown using reactREACT
Click to see more ...
1.4K
127
create alarm clock using reactREACT
Click to see more ...
5.4K
115
How to get latitude and longitude using react/javascript ?REACT
Click to see more ...
1.2K
108
get client country reactREACT
Click to see more ...
936
82
get ip address reactREACT
Click to see more ...
1.2K
81
time ago reactREACT
Click to see more ...
750
74
detect mobile device reactREACT
Click to see more ...
716
58