Time methods
Use these methods with time.Time values.
Use these methods with time.Time values.
TIME.Add DURATION ⟼ time.TimeReturns the given time plus the given duration. Read More »
TIME.AddDate YEARS MONTHS DAYS ⟼ time.TimeReturns the time corresponding to adding the given number of years, months, and days to the given time.Time value. Read More »
TIME1.After TIME2 ⟼ boolReports whether TIME1 is after TIME2. Read More »
TIME1.Before TIME2 ⟼ boolReports whether TIME1 is before TIME2. Read More »
TIME.Day ⟼ intReturns the day of the month of the given time.Time value. Read More »
TIME1.Equal TIME2 ⟼ boolReports whether TIME1 is equal to TIME2. Read More »
TIME.Format LAYOUT ⟼ stringReturns a textual representation of the time.Time value formatted according to the layout string. Read More »
TIME.Hour ⟼ intReturns the hour within the day of the given time.Time value, in the range [0, 23]. Read More »
TIME.IsDST ⟼ boolReports whether the given time.Time value is in Daylight Savings Time. Read More »
TIME.IsZero ⟼ boolReports whether the given time.Time value represents the zero time instant, January 1, year 1, 00:00:00 UTC. Read More »
TIME.Local ⟼ time.TimeReturns the given time.Time value with the location set to local time. Read More »
TIME.Minute ⟼ intReturns the minute offset within the hour of the given time.Time value, in the range [0, 59]. Read More »
TIME.Month ⟼ time.MonthReturns the month of the year of the given time.Time value. Read More »
TIME.Nanosecond ⟼ intReturns the nanosecond offset within the second of the given time.Time value, in the range [0, 999999999]. Read More »
TIME.Round DURATION ⟼ time.TimeReturns the result of rounding TIME to the nearest multiple of DURATION since January 1, 0001, 00:00:00 UTC. Read More »
TIME.Second ⟼ intReturns the second offset within the minute of the given time.Time value, in the range [0, 59]. Read More »
TIME1.Sub TIME2 ⟼ time.DurationReturns the duration computed by subtracting TIME2 from TIME1. Read More »
TIME.Truncate DURATION ⟼ time.TimeReturns the result of rounding TIME down to a multiple of DURATION since January 1, 0001, 00:00:00 UTC. Read More »
TIME.Unix ⟼ int64Returns the given time.Time value expressed as the number of seconds elapsed since January 1, 1970 UTC. Read More »
TIME.UnixMicro ⟼ int64Returns the given time.Time value expressed as the number of microseconds elapsed since January 1, 1970 UTC. Read More »
TIME.UnixMilli ⟼ int64Returns the given time.Time value expressed as the number of milliseconds elapsed since January 1, 1970 UTC. Read More »
TIME.UnixNano ⟼ int64Returns the given time.Time value expressed as the number of nanoseconds elapsed since January 1, 1970 UTC. Read More »
TIME.UTC ⟼ time.TimeReturns the given time.Time value with the location set to UTC. Read More »
TIME.Weekday ⟼ time.WeekdayReturns the day of the week of the given time.Time value. Read More »
TIME.Year ⟼ intReturns the year of the given time.Time value. Read More »
TIME.YearDay ⟼ intReturns the day of the year of the given time.Time value, in the range [1, 365] for non-leap years, and [1, 366] in leap years. Read More »