Skip to content

Commit bdcd3e4

Browse files
committed
refactor(parser): Add deprecated flag for ParseWithLayouts and ParseWithFormats functions
1 parent 10592aa commit bdcd3e4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

parser.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,18 @@ func ParseByFormats(value string, formats []string, timezone ...string) Carbon {
185185
return ParseByLayouts(value, layouts, tz)
186186
}
187187

188-
// Deprecated: it will be removed in the future, use ParseByLayouts instead.
189188
// ParseWithLayouts parses a time string as a Carbon instance by multiple fuzzy layouts.
189+
// Deprecated: it will be removed in the future, use ParseByLayouts instead.
190190
// 通过多个模糊的 布局模板 将时间字符串解析成 Carbon 实例
191+
// 未来将移除,请用 ParseByLayouts 替代
191192
func ParseWithLayouts(value string, layouts []string, timezone ...string) Carbon {
192193
return ParseByLayouts(value, layouts, timezone...)
193194
}
194195

195-
// Deprecated: it will be removed in the future, use ParseByFormats instead.
196196
// ParseWithFormats parses a time string as a Carbon instance by multiple fuzzy formats.
197+
// Deprecated: it will be removed in the future, use ParseByFormats instead.
197198
// 通过多个模糊的 格式模板 将时间字符串解析成 Carbon 实例
199+
// 未来将移除,请用 ParseByFormats 替代
198200
func ParseWithFormats(value string, formats []string, timezone ...string) Carbon {
199201
return ParseByFormats(value, formats, timezone...)
200202
}

0 commit comments

Comments
 (0)