Created
June 3, 2020 09:42
-
-
Save noamt/a4c4559c452b6470678ed79231a79640 to your computer and use it in GitHub Desktop.
For the Medium post "Find the first day of the week with Go"
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
package main | |
import ( | |
"github.com/noamt/go-cldr/supplemental" | |
"golang.org/x/text/language" | |
) | |
func main() { | |
tag, _ := language.Parse("en-US") | |
region, _ := tag.Region() | |
weekDay := supplemental.FirstDay.ByRegion(region) | |
println("First day is", weekDay) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment