Categorygithub.com/xeonx/timeago
modulepackage
1.0.0-rc5
Repository: https://github.com/xeonx/timeago.git
Documentation: pkg.go.dev

# README

timeago - A time formatting package

Install

go get github.com/xeonx/timeago

Docs

http://godoc.org/github.com/xeonx/timeago

Use

package main

import (
	"time"
	"github.com/xeonx/timeago"
)
	
func main() {
	t := time.Now().Add(42 * time.Second)
	
	s := timeago.English.Format(t)
	//s will contains "less than a minute ago"
	
	//...
}

Tests

go test is used for testing.

# Functions

NoMax creates an new config without a maximum.
WithMax creates an new config with special formatting limited to durations less than max.Values greater than max will be formatted by the standard time package using the defaultLayout.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
Predefined english configuration.
Predefined french configuration.
Predefined german configuration.
Korean support.
No description provided by the author
No description provided by the author
Predefined turkish configuration.

# Structs

Config allows the customization of timeago.You may configure string items (language, plurals, ...) andmaximum allowed duration value for fuzzy formatting.
No description provided by the author