ToStdTime->StdTime

This commit is contained in:
Peleus 2024-02-01 11:31:49 +08:00
parent 717e75baf6
commit ecaef0f313
3 changed files with 4 additions and 4 deletions

View File

@ -71,7 +71,7 @@ carbon.SetDefault(carbon.Default{
// 将标准 time.Time 转换成 Carbon
carbon.CreateFromStdTime(time.Now())
// 将 Carbon 转换成标准 time.Time
carbon.Now().ToStdTime()
carbon.Now().StdTime()
```
##### 昨天、今天、明天

View File

@ -75,7 +75,7 @@ carbon.SetDefault(carbon.Default{
// 標準の time.Time を Carbon に変換します
carbon.CreateFromStdTime(time.Now())
// Carbon を標準の time.Time に変換します
carbon.Now().ToStdTime()
carbon.Now().StdTime()
```
##### 昨日、今日、明日

View File

@ -71,10 +71,10 @@ carbon.SetDefault(carbon.Default{
##### Convert between Carbon and Time
```go
// Convert standard Time.time into Carbon
// Convert standard Time.time to Carbon
carbon.CreateFromStdTime(time.Now())
// Convert Carbon to standard Time.time
carbon.Now().ToStdTime()
carbon.Now().StdTime()
```
##### Yesterday, today and tomorrow