{"id":25765355,"url":"https://github.com/andordavoti/react-native-timeago","last_synced_at":"2026-03-27T04:59:33.284Z","repository":{"id":57097416,"uuid":"299643398","full_name":"andordavoti/react-native-timeago","owner":"andordavoti","description":"A super simple React Native timeago Component library using date-fns.","archived":false,"fork":false,"pushed_at":"2020-10-12T21:31:01.000Z","size":2995,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-20T21:47:25.896Z","etag":null,"topics":["date-fns","expo","react-native","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@andordavoti/react-native-timeago","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andordavoti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-29T14:30:24.000Z","updated_at":"2023-05-30T15:58:38.000Z","dependencies_parsed_at":"2022-08-20T18:10:27.336Z","dependency_job_id":null,"html_url":"https://github.com/andordavoti/react-native-timeago","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andordavoti%2Freact-native-timeago","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andordavoti%2Freact-native-timeago/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andordavoti%2Freact-native-timeago/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andordavoti%2Freact-native-timeago/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andordavoti","download_url":"https://codeload.github.com/andordavoti/react-native-timeago/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240941514,"owners_count":19882063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["date-fns","expo","react-native","typescript"],"created_at":"2025-02-26T22:18:14.904Z","updated_at":"2026-03-27T04:59:33.231Z","avatar_url":"https://github.com/andordavoti.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @andordavoti/react-native-timeago\n\nA simple auto-updating React Native timeago Component using [date-fns](https://date-fns.org/).\n\nInspired by: [react-native-timeago](https://www.npmjs.com/package/react-native-timeago) (replaced momentjs with date-fns due to momentjs now being legacy, and switched from class-based to functional).\n\nSupports iOS, Android and Web. Written in Typescript.\n\n## Installation\n\nRun:\n\n```sh\nnpm i @andordavoti/react-native-timeago\n```\n\nImport the module:\n\n```js\nimport TimeAgo from '@andordavoti/react-native-timeago';\n```\n\n## Usage\n\nUse it as a regular React Native Text component and pass it a Date. Other optional props can be passed which are specified bellow. There is also an Expo app example in the repo under the example folder.\n\n```js\nimport React from 'react';\nimport TimeAgo from '@andordavoti/react-native-timeago';\n\nconst App: React.FC = () =\u003e {\n  return \u003cTimeAgo dateTo={new Date(1536484369695)} /\u003e;\n};\n\nexport default App;\n```\n\n## Props\n\n| Name           |   Type    | Required | Description                                                                |\n| :------------- | :-------: | :------: | :------------------------------------------------------------------------- |\n| dateTo         |  `Date`   |   yes    | date you want the component to count to (uses the current date as a start).|\n| dateFrom       |  `Date`   | optional | Overwrite the current Date as a starting point.                            |\n| hideAgo        | `boolean` | optional | Hides the \"ago\" text.                                                      |\n| updateInterval | `number`  | optional | How often the current date should update (only when using the \"dateFrom\" prop). Default is 60000 milliseconds                                                      |\n| style    |  `bool`   | optional | Style passed to the Text component.                                        |\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandordavoti%2Freact-native-timeago","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandordavoti%2Freact-native-timeago","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandordavoti%2Freact-native-timeago/lists"}