Skip to content

Commit

Permalink
Update content
Browse files Browse the repository at this point in the history
  • Loading branch information
gouguoyin committed Jan 26, 2024
1 parent dc11d26 commit 7ff566c
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import "gitee.com/golang-module/carbon"

```go
carbon.SetDefault(carbon.Default{
Layout: carbon.RFC3339Layout,
Layout: carbon.DateTimeLayout,
Timezone: carbon.PRC,
WeekStartsAt: carbon.Sunday,
Locale: "zh-CN",
Expand Down Expand Up @@ -245,15 +245,6 @@ carbon.ParseByLayout("今天是 2020年08月05日13时14分15秒", "今天是 20
carbon.ParseByLayout("2020-08-05 13:14:15", "2006-01-02 15:04:05", carbon.Tokyo).ToDateTimeString() // 2020-08-05 14:14:15
```

##### Carbon 和 time.Time 互转

```go
// 将标准 time.Time 转换成 Carbon
carbon.CreateFromStdTime(time.Now())
// 将 Carbon 转换成标准 time.Time
carbon.Now().ToStdTime()
```

##### 时间边界

```go
Expand Down

0 comments on commit 7ff566c

Please sign in to comment.