use-datetime
v1.2.0
Published
React hook for date and time string representations
Downloads
2
Readme
useDatetime
A React hook for data and time string representations of present moment.
import useDatetime from 'use-datetime'
const Component = () => {
}
export default () => {
const date = useDatetime({ format: 'YYYY-MM-DD' })
const weekday = useDatetime({ format: 'dddd' })
return <div>{date} {weekday}</div>
}