https://github.com/serhiicho/timeago
Date and time library for your Go project that converts dates into 'time ago' format
https://github.com/serhiicho/timeago
datetime datetime-converter datetime-formatters go go-package golang time timeago timeago-go
Last synced: 10 days ago
JSON representation
Date and time library for your Go project that converts dates into 'time ago' format
- Host: GitHub
- URL: https://github.com/serhiicho/timeago
- Owner: SerhiiCho
- License: mit
- Created: 2019-10-24T05:43:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-28T19:22:12.000Z (about 2 months ago)
- Last Synced: 2025-05-06T23:37:27.413Z (16 days ago)
- Topics: datetime, datetime-converter, datetime-formatters, go, go-package, golang, time, timeago, timeago-go
- Language: Go
- Homepage: https://time-ago.github.io/
- Size: 372 KB
- Stars: 19
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README

[](https://github.com/SerhiiCho/timeago/actions/workflows/go.yml)
[](https://actions-badge.atrox.dev/SerhiiCho/timeago/goto?ref=master)
[](https://scrutinizer-ci.com/g/SerhiiCho/timeago/build-status/master)
[](https://scrutinizer-ci.com/g/SerhiiCho/timeago/?branch=master)
[](https://github.com/SerhiiCho/timeago/blob/master/LICENSE.md)Timeago is a fast and lightweight date time package that converts given date into human readable "n time ago" format in different languages, such as π¬π§ π·πΊ πΊπ¦ π³π± π©πͺ π¨π³ π§πΎ πͺπΈ π―π΅ π«π·. For more information you can read the [documentation](https://time-ago.github.io/).
### Follow the [Official documentation](https://time-ago.github.io/) for all the details
- [π Documentation](https://time-ago.github.io/)
- [π Release notes](https://github.com/SerhiiCho/timeago/blob/master/CHANGELOG.md)## Quick Start
```bash
go get github.com/SerhiiCho/timeago/v3
```## Codebase naming
Here are some of the naming conventions used in the codebase and their meanings for better understanding:- **time unit** - a single time unit like `second`, `seconds`, `minute`, `minutes`, etc.
- **time number** - a number of time units like `1`, `2`, `3`, etc. in a string like `1 minute ago`, `2 minutes ago`, `3 minutes ago`, etc.
- **suffix** - the suffix `ago` in the final output like `1 minute ago`, `2 minutes ago`, `3 minutes ago`, etc.
- **time since** - the final output result like `2 minutes`, `3 minutes ago`, `Just now`, `Online`, `3 years ago` etc.## License
This project is open-sourced software licensed under the [MIT license](https://github.com/SerhiiCho/timeago/blob/master/LICENSE.md).