iso8601

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2018 License: MIT Imports: 2 Imported by: 0

README

iso8601

GoDoc

iso8601 is a simple Go package for formatting time.Duration according to the ISO 8601 format.

package main

import (
	"fmt"
	"time"

	"github.com/p3lim/iso8601"
)

func main() {
	t := time.Now()
	time.Sleep(5 * time.Second)
	fmt.Println(iso8601.Format(time.Since(t)))
}

Documentation

Overview

The iso8601 package formats time.Duration in the ISO 8601 format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(d time.Duration) string

Returns a ISO 8601 formatted string from a time.Duration instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL