github.com/geniusesgroup/libgo@v0.0.0-20220713101832-828057a9d3d4/time/utc/duration.go (about) 1 /* For license and copyright information please see LEGAL file in repository */ 2 3 package utc 4 5 import ( 6 "../../protocol" 7 ) 8 9 // Common durations. 10 const ( 11 Nanosecond protocol.Duration = 1 12 Microsecond = 1000 * Nanosecond 13 Millisecond = 1000 * Microsecond 14 Second = 1000 * Millisecond 15 Minute = 60 * Second 16 Hour = 60 * Minute 17 Day = 24 * Hour 18 Week = 7 * Day 19 // Month = 2629743 * Second // 30.44 days 20 // Year = 31556926 * Second // 365.24 days 21 22 // TropicalYear also known as a solar year - https://en.wikipedia.org/wiki/Tropical_year 23 TropicalYear = (365 * 24 * 60 * 60) + (5 * 60 * 60) + (48 * 60) + 46 // 365.24219 * 24 * 60 * 60 = 31,556,925.216 24 )