We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d929030 commit ccc7974Copy full SHA for ccc7974
traveler.go
@@ -8,7 +8,7 @@ import (
8
// 当前
9
func Now(timezone ...string) *Carbon {
10
if IsTestNow() {
11
- return frozenNow.testNow
+ return frozenNow.testNow.Copy()
12
}
13
var (
14
tz string
@@ -33,7 +33,7 @@ func Tomorrow(timezone ...string) *Carbon {
33
if now.IsInvalid() {
34
return now
35
36
- return now.Copy().AddDay()
+ return now.AddDay()
37
38
39
// Yesterday returns a Carbon instance for yesterday.
@@ -43,7 +43,7 @@ func Yesterday(timezone ...string) *Carbon {
43
44
45
46
- return now.Copy().SubDay()
+ return now.SubDay()
47
48
49
// AddDuration adds duration.
0 commit comments