You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
178 B
14 lines
178 B
1 year ago
|
package themis
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
var now func() time.Time
|
||
|
|
||
|
func init() {
|
||
|
now = time.Now
|
||
|
}
|
||
|
|
||
|
func NextMonday() time.Time {
|
||
|
return now().AddDate(0, 0, int((8-now().Weekday())%7))
|
||
|
}
|