Created
October 17, 2019 10:45
-
-
Save scDisorder/c26e711efca3c9a863df7f1b5b705bfe to your computer and use it in GitHub Desktop.
Golang time.Parse(format, layout) std parser helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ( | |
stdLongMonth = "January" | |
stdMonth = "Jan" | |
stdNumMonth = "1" | |
stdZeroMonth = "01" | |
stdLongWeekDay = "Monday" | |
stdWeekDay = "Mon" | |
stdDay = "2" | |
stdUnderDay = "_2" | |
stdZeroDay = "02" | |
stdHour = "15" | |
stdHour12 = "3" | |
stdZeroHour12 = "03" | |
stdMinute = "4" | |
stdZeroMinute = "04" | |
stdSecond = "5" | |
stdZeroSecond = "05" | |
stdLongYear = "2006" | |
stdYear = "06" | |
stdPM = "PM" | |
stdpm = "pm" | |
stdTZ = "MST" | |
stdISO8601TZ = "Z0700" // prints Z for UTC | |
stdISO8601ColonTZ = "Z07:00" // prints Z for UTC | |
stdNumTZ = "-0700" // always numeric | |
stdNumShortTZ = "-07" // always numeric | |
stdNumColonTZ = "-07:00" // always numeric | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment