-
之前我使用 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
more formats can be used with |
Beta Was this translation helpful? Give feedback.
-
We can add a method to set the layout maps for parsing |
Beta Was this translation helpful? Give feedback.
-
Added c := carbon.ParseWithLayouts("2020|08|05 13|14|15", []string{"2006|01|02 15|04|05", "2006|1|2 3|4|5"})
fmt.Println(c.ToString())
fmt.Println(c.CurrentLayout())
// Output:
// 2020-08-05 13:14:15 +0000 UTC
// 2006|01|02 15|04|05 |
Beta Was this translation helpful? Give feedback.
Added
ParseWithLayouts
andParseWithFormats
methods inv2.6.1
https://github.com/dromara/carbon?tab=readme-ov-file#parse-a-time-string-as-a-carbon-instance-with-layouts
https://github.com/dromara/carbon?tab=readme-ov-file#-parse-a-time-string-as-a-carbon-instance-with-formats