noamt / go-cldr

A Go implementation of CLDR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GO-CLDR

CircleCI

A (still partial) implementation of Unicode’s CLDR in Go

Examples

Supplemental

First Day

Get the first day of the week for a given region.

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)
}

Building

$ go generate
$ go test -cover ./...

About

A Go implementation of CLDR


Languages

Language:Go 100.0%