Documentation
¶
Overview ¶
Example ¶
package main
import (
"fmt"
"time"
"github.com/rakunlabs/tummy"
)
func main() {
tummy.Enable()
tummy.SetTime(time.Date(1919, 5, 19, 12, 0, 0, 0, time.UTC))
tummy.AddDuration(2 * time.Hour)
fmt.Println(tummy.Now().Hour()) // 14
tummy.AddDate(0, 0, 1)
fmt.Println(tummy.Now().Day()) // 20
}
Output: 14 20
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Now = time.Now
)
Functions ¶
func AddDuration ¶
AddDuration adds a duration to the global tummy.Now.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.