Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 2.17 KB

README.md

File metadata and controls

29 lines (22 loc) · 2.17 KB

golang

Go Build Status Build Status Scrutinizer Code Quality GitHub

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.

Follow the Official documentation for all the details

Quick Start

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.