Skip to content

Instantly share code, notes, and snippets.

@noamt
Created June 3, 2020 09:42
Show Gist options
  • Save noamt/a4c4559c452b6470678ed79231a79640 to your computer and use it in GitHub Desktop.
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"
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