Skip to content

Commit

Permalink
Add description about Closest and Farthest methods
Browse files Browse the repository at this point in the history
  • Loading branch information
gouguoyin committed Nov 7, 2023
1 parent e04fb0e commit 87dbd56
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ c1 := carbon.Parse("2023-03-28")
c2 := carbon.Parse("2023-04-16")

// 返回最近的 Carbon 实例
c.Closest(c1, c2).ToDateString() // 2023-03-28
c.Closest(c1, c2) // c1
// 返回最远的 Carbon 实例
c.Farthest(c1, c2).ToDateString() // 2023-04-16
c.Farthest(c1, c2) // c2
```

##### 开始时间、结束时间
Expand Down
4 changes: 2 additions & 2 deletions README.jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ c1 := carbon.Parse("2023-03-28")
c2 := carbon.Parse("2023-04-16")

// 最近のCarbonインスタンスを返す
c.Closest(c1, c2).ToDateString() // 2023-03-28
c.Closest(c1, c2) // c1
// 最も遠いCarbonインスタンスを返す
c.Farthest(c1, c2).ToDateString() // 2023-04-16
c.Farthest(c1, c2) // c2
```

##### 始まりと終わり
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ c1 := carbon.Parse("2023-03-28")
c2 := carbon.Parse("2023-04-16")

// Return the closest Carbon instance
c.Closest(c1, c2).ToDateString() // 2023-03-28
c.Closest(c1, c2) // c1
// Return the farthest Carbon instance
c.Farthest(c1, c2).ToDateString() // 2023-04-16
c.Farthest(c1, c2) // c2
```

##### Start and end
Expand Down

0 comments on commit 87dbd56

Please sign in to comment.