how-long-time-ago

1.1.15 • Public • Published

How to Use

import {TimeAgo} from 'how-long-time-ago';

function App() { return (

<TimeAgo date={'Sat Jun 26 2021 21:12:43'} style={{fontSize:20}} suffix={true} /> ); }

expected response(example): 3 days ago

#Props

date: You can pass date from which you find time ago (default local date). style: You can giv custom style using style props (default no style). suffix: You can display "ago" keyword coditionally by passing suffix props (default true).

/how-long-time-ago/

    Package Sidebar

    Install

    npm i how-long-time-ago

    Weekly Downloads

    1

    Version

    1.1.15

    License

    ISC

    Unpacked Size

    331 kB

    Total Files

    19

    Last publish

    Collaborators

    • mudasser4238