coder / bigdur

A Go package for parsing larger durations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bigdur

A small Go package for parsing larger durations.

GoDoc

Install

go get -u go.coder.com/bigdur

Overview

A duration token consists of a series of coefficient and unit pairs.

For example:

  • 4d
  • 4m4s
  • 4mo2.2d5s

are valid.

The following units are available:

Abbreviation Description
s 1 second
m 60 seconds
h 60 minutes
d 24 hours
w 7 days
mo 30 days
y 12 months

About

A Go package for parsing larger durations.

License:MIT License


Languages

Language:Go 96.0%Language:Dockerfile 4.0%