{"id":21074309,"url":"https://github.com/tylerlh/react-native-timeago","last_synced_at":"2025-05-16T14:07:23.601Z","repository":{"id":34226618,"uuid":"38092324","full_name":"TylerLH/react-native-timeago","owner":"TylerLH","description":"An auto-updating timeago component for React Native using moment.js","archived":false,"fork":false,"pushed_at":"2023-06-11T18:24:44.000Z","size":2368,"stargazers_count":349,"open_issues_count":27,"forks_count":71,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-16T14:07:21.244Z","etag":null,"topics":["moment","react","react-native"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TylerLH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-06-26T05:23:21.000Z","updated_at":"2025-03-22T07:35:43.000Z","dependencies_parsed_at":"2024-01-08T01:01:11.103Z","dependency_job_id":"a0d73bc3-24e5-4af3-a6f3-4ba090b50af7","html_url":"https://github.com/TylerLH/react-native-timeago","commit_stats":{"total_commits":52,"total_committers":10,"mean_commits":5.2,"dds":"0.23076923076923073","last_synced_commit":"fd0234d8688acb0d8a5deb998c3c7167627780d4"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerLH%2Freact-native-timeago","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerLH%2Freact-native-timeago/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerLH%2Freact-native-timeago/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerLH%2Freact-native-timeago/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TylerLH","download_url":"https://codeload.github.com/TylerLH/react-native-timeago/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544146,"owners_count":22088807,"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":["moment","react","react-native"],"created_at":"2024-11-19T19:15:41.583Z","updated_at":"2025-05-16T14:07:23.569Z","avatar_url":"https://github.com/TylerLH.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-timeago\n\n[![View package on npm](https://img.shields.io/npm/v/react-native-timeago.svg?maxAge=2592000\u0026style=flat-square)](https://www.npmjs.com/package/react-native-timeago) [![npm](https://img.shields.io/npm/dm/react-native-timeago.svg?maxAge=2592000\u0026style=flat-square)](https://www.npmjs.com/package/react-native-timeago) ![Build status](https://travis-ci.org/tylerlh/react-native-timeago.svg?branch=master)\n\nAn auto-updating timeago component for React Native using [moment.js](http://momentjs.com/).\n\n## Usage\n\n```jsx\nimport React, { Component } from 'react';\nimport TimeAgo from 'react-native-timeago';\n\n// Timestamp can be any valid data type accepted in a Moment.js constructor\n// Currently accepts string, number, array, or a Date instance\nlet timestamp = \"2015-06-21T06:24:44.124Z\";\n\nclass MyComponent extends Component {\n\n  ...\n\n  render() {\n    return (\n      \u003cTimeAgo time={timestamp} /\u003e\n    )\n  }\n\n  ...\n};\n```\n\nIf you'd like to hide the string \"ago\" from the phrase returned, you can use the hideAgo prop:\n\n\n```jsx\n\u003cTimeAgo time={timestamp} hideAgo={true} /\u003e\n```\n\nAll normal Text props are applicable (including style). Use the `interval` prop to change the update interval in milliseconds (default: 60000).\n\n```jsx\n// This component would update every 20 seconds\n\u003cTimeAgo time={timestamp} interval={20000} /\u003e\n```\n\n## Support local language\nTo support local language, you need to require locale language file, and call `moment.locale()` in your app.\nFor example\n```jsx\nlet TimeAgo = require('react-native-timeago');\n\nlet moment = require('moment'); //load moment module to set local language\nrequire('moment/locale/zh-cn'); //for import moment local language file during the application build\nmoment.locale('zh-cn');//set moment local language to zh-cn\n...\n```\n\n\n## Contributing\n\nIf you'd like to see something added or changed to this module please open a new GitHub issue. Pull requests are always welcome.\n\n## Author\nCreated and maintained by [Tyler Hughes](https://twitter.com/iampbt).\nContributions by [these fine folks](https://github.com/TylerLH/react-native-timeago/graphs/contributors).\n\n## License\nCopyright (c) 2015-2018, Tyler Hughes \u003ciampbt@gmail.com\u003e\n\nPermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylerlh%2Freact-native-timeago","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftylerlh%2Freact-native-timeago","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylerlh%2Freact-native-timeago/lists"}