Skip to content

Commit e48d09e

Browse files
committed
Merge branch 'v2.6.x'
# Conflicts: # parser.go
2 parents 150e2dc + 63162be commit e48d09e

5 files changed

Lines changed: 8 additions & 6 deletions

File tree

README.cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ carbon.ParseByLayout("2020-08-05 13:14:15", "2006-01-02 15:04:05", carbon.Tokyo)
261261
```
262262

263263
##### 通过一个确认的 `格式模板` 将时间字符串解析成 `Carbon` 实例
264-
> 注:如果使用的字母与格式模板冲突时,请使用转义符转义该字母
264+
> 注:如果使用的字母与格式模板冲突时,请使用转义符 "/" 转义该字母
265265
266266
```go
267267
carbon.ParseByFormat("2020|08|05 13|14|15", "Y|m|d H|i|s").ToDateTimeString() // 2020-08-05 13:14:15

README.jp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ carbon.ParseByLayout("2020-08-05 13:14:15", "2006-01-02 15:04:05", carbon.Tokyo)
257257
```
258258

259259
##### 確認されたフォーマットテンプレートによって時間文字列を `Carbon` インスタンスに解析する
260-
> 注:使用する文字がフォームテンプレートと競合している場合は、エスケープを使用して文字をエスケープします
260+
> 注:使用している文字がフォームテンプレートと競合している場合は、エスケープ文字 "/" を使用して文字をエスケープします
261261
262262
```go
263263
carbon.ParseByFormat("2020|08|05 13|14|15", "Y|m|d H|i|s").ToDateTimeString() // 2020-08-05 13:14:15

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ carbon.ParseByLayout("今天是 2020年08月05日13时14分15秒", "今天是 20
256256
```
257257

258258
##### Parse a time string as a `Carbon` instance by a confirmed format
259-
> Note: If the letter used conflicts with the format sign, please use an escape character to escape the letter
259+
> Note: If the letter used conflicts with the format sign, please use the escape character "\" to escape the letter
260260
261261
```go
262262
carbon.ParseByFormat("2020|08|05 13|14|15", "Y|m|d H|i|s").ToDateTimeString() // 2020-08-05 13:14:15

constants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
)
66

77
// Version current version
8-
const Version = "2.6.5"
8+
const Version = "2.6.6"
99

1010
// timezone constants
1111
const (

parser.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ func ParseByLayout(value, layout string, timezone ...string) *Carbon {
105105
}
106106

107107
// ParseByFormat parses a time string as a Carbon instance by a confirmed format.
108+
//
109+
// Note: If the letter used conflicts with the format sign, please use the escape character "\" to escape the letter
108110
func ParseByFormat(value, format string, timezone ...string) *Carbon {
109111
if value == "" {
110112
return &Carbon{isEmpty: true}
@@ -121,7 +123,7 @@ func ParseByFormat(value, format string, timezone ...string) *Carbon {
121123

122124
// ParseByLayouts parses a time string as a Carbon instance by multiple fuzzy layouts.
123125
//
124-
// Note: it doesn't support timestamp layouts parsing
126+
// Note: it doesn't support parsing by timestamp layouts.
125127
func ParseByLayouts(value string, layouts []string, timezone ...string) *Carbon {
126128
if value == "" {
127129
return &Carbon{isEmpty: true}
@@ -157,7 +159,7 @@ func ParseByLayouts(value string, layouts []string, timezone ...string) *Carbon
157159

158160
// ParseByFormats parses a time string as a Carbon instance by multiple fuzzy formats.
159161
//
160-
// Note: it doesn't support timestamp formats parsing
162+
// Note: it doesn't support parsing by timestamp formats.
161163
func ParseByFormats(value string, formats []string, timezone ...string) *Carbon {
162164
if value == "" {
163165
return &Carbon{isEmpty: true}

0 commit comments

Comments
 (0)