Package that provides you with a method that describes the time between `time.Now()` and a given time
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Build Status

This package provides you with a method that describes the time between time.Now() and a given time. It's an alternative package to justincampbell/timeago.

Dialogs describing the time difference

↓ Formatted date (eg. Mon Jan 2 2015)
↓ Yesterday hh:mm 
↓ Today hh:mm
↓ About %s minutes ago 
↓ About one minute ago 
↓ About %s seconds ago
↓ Recently
- Now
↑ Soon
↑ In about %s seconds
↑ In about one minute
↑ In about %s minutes
↑ Today hh:mm
↑ Tomorrow hh:mm
↑ Formatted date (eg. Mon Jan 2 2021)


func Format(time time.Time, dialogs timeagoo.language.Dialogs) string

package main

import (


func formatWhenIncidentOccurred(i Incident) {    
    return timeagoo.Format(i.time, timeagoo.EnglishDialogs{})

Multilingual support

The package comes with an English translation of all dialogs. You can use another language by implementing the Dialogs interface.

import "time"

type swedishDialogs struct {

func (swedishDialogs) Recently() string {
    return "Nyligen";

func FormatTimeagoo(t time.Time) string {
    return timeagoo.Format(t, swedishDialogs{})