Skip to content

Commit 87dbd56

Browse files
committed
Add description about Closest and Farthest methods
1 parent e04fb0e commit 87dbd56

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ c1 := carbon.Parse("2023-03-28")
248248
c2 := carbon.Parse("2023-04-16")
249249

250250
// 返回最近的 Carbon 实例
251-
c.Closest(c1, c2).ToDateString() // 2023-03-28
251+
c.Closest(c1, c2) // c1
252252
// 返回最远的 Carbon 实例
253-
c.Farthest(c1, c2).ToDateString() // 2023-04-16
253+
c.Farthest(c1, c2) // c2
254254
```
255255

256256
##### 开始时间、结束时间

README.jp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ c1 := carbon.Parse("2023-03-28")
248248
c2 := carbon.Parse("2023-04-16")
249249

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

256256
##### 始まりと終わり

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ c1 := carbon.Parse("2023-03-28")
246246
c2 := carbon.Parse("2023-04-16")
247247

248248
// Return the closest Carbon instance
249-
c.Closest(c1, c2).ToDateString() // 2023-03-28
249+
c.Closest(c1, c2) // c1
250250
// Return the farthest Carbon instance
251-
c.Farthest(c1, c2).ToDateString() // 2023-04-16
251+
c.Farthest(c1, c2) // c2
252252
```
253253

254254
##### Start and end

0 commit comments

Comments
 (0)