Documentation
¶
Index ¶
- func Approx(compareTo time.Time, threshold time.Duration) types.BeMatcher
- func EarlierThan(compareTo time.Time) types.BeMatcher
- func EarlierThanEqual(compareTo time.Time) types.BeMatcher
- func IsDST(compareTo time.Time) types.BeMatcher
- func LaterThan(compareTo time.Time) types.BeMatcher
- func LaterThanEqual(compareTo time.Time) types.BeMatcher
- func SameDay(compareTo time.Time) types.BeMatcher
- func SameHour(compareTo time.Time) types.BeMatcher
- func SameMinute(compareTo time.Time) types.BeMatcher
- func SameMonth(compareTo time.Time) types.BeMatcher
- func SameNano(compareTo time.Time) types.BeMatcher
- func SameOffset(compareTo time.Time) types.BeMatcher
- func SameSecond(compareTo time.Time) types.BeMatcher
- func SameTimezone(compareTo time.Time) types.BeMatcher
- func SameWeek(compareTo time.Time) types.BeMatcher
- func SameWeekday(compareTo time.Time) types.BeMatcher
- func SameYear(compareTo time.Time) types.BeMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Approx ¶
Approx succeeds if actual time is approximately equal to the specified time `compareTo` within the given time duration threshold.
func EarlierThan ¶
EarlierThan succeeds if actual time is earlier than the specified time `compareTo`.
func EarlierThanEqual ¶
EarlierThanEqual succeeds if actual time is earlier than or equal to the specified time `compareTo`.
func LaterThanEqual ¶
LaterThanEqual succeeds if actual time is later than or equal to the specified time `compareTo`.
func SameDay ¶
SameDay succeeds if the day component of the actual time is equal to the day component of the specified time `compareTo`.
func SameHour ¶
SameHour succeeds if actual time is approximately equal to the specified time `compareTo` with the precision of one hour.
func SameMinute ¶
SameMinute succeeds if actual time is approximately equal to the specified time `compareTo` with the precision of one minute.
func SameMonth ¶
SameMonth succeeds if the month component of the actual time is equal to the month component of the specified time `compareTo`.
func SameNano ¶
SameNano succeeds if actual time is approximately equal to the specified time `compareTo` with the precision of one nanosecond.
func SameOffset ¶
SameOffset checks if actual time is the same timezone offset as specified time `compareTo` Note: times can have different timezone names, but same offset, e.g. America/New_York and Canada/Toronto
func SameSecond ¶
SameSecond succeeds if actual time is approximately equal to the specified time `compareTo` with the precision of one second.
func SameTimezone ¶
SameTimezone checks if actual time is the same timezone as specified time `compareTo`
func SameWeek ¶
SameWeek succeeds if the ISO week and year components of the actual time are equal to the ISO week and year components of the specified time `compareTo`.
func SameWeekday ¶
SameWeekday succeeds if the weekday component of the actual time is equal to the weekday component of the specified time `compareTo`.
Types ¶
This section is empty.