Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 552 Bytes

README.md

File metadata and controls

46 lines (28 loc) · 552 Bytes

Time Periods

Create periods of Time. Normalize them for custom calculations.

Install

go get github.com/andrelugomes/time-periods

Import

import "github.com/andrelugomes/time-periods/periods"

Usage

Period

period := Period{
		time.Date(2020, 01, 02, 11, 0, 0, 0, time.UTC),
		time.Date(2020, 01, 06, 0, 0, 0, 0, time.UTC),
	}

Normalize

periods := []Period{p1,p2}

uniques := Normalize(periods)

Comparison

comparison := Comparison{first, second}

comparison.Is...