diff options
author | joeybloggs <Dean.Karn@gmail.com> | 2016-08-18 00:34:07 +0300 |
---|---|---|
committer | joeybloggs <Dean.Karn@gmail.com> | 2016-08-18 00:34:07 +0300 |
commit | 936167fec07f617d1236bcc41e24702a75a3be92 (patch) | |
tree | 26b90dd20b2f2a305eb5f5c94f9a8ee6b876751b /rules.go | |
parent | 3997c6649a9fb903422fd3f42e7d1854d848ae3f (diff) |
look at timezones to see if can set appropriately in FmtTime...
Diffstat (limited to 'rules.go')
-rw-r--r-- | rules.go | 41 |
1 files changed, 41 insertions, 0 deletions
@@ -2,6 +2,7 @@ package locales import ( "strconv" + "time" "github.com/go-playground/locales/currency" ) @@ -81,6 +82,46 @@ type Translator interface { // in accounting notation. returned as a []byte just in case the caller wishes to add more and can help // avoid allocations; otherwise just cast as string. FmtAccounting(num float64, v uint64, currency currency.Type) []byte + + // returns the short date representation of 't' for '{{ .Locale }}' + // returned as a []byte just in case the caller wishes to add more and can help + // avoid allocations; otherwise just cast as string. + FmtDateShort(t time.Time) []byte + + // returns the medium date representation of 't' for '{{ .Locale }}' + // returned as a []byte just in case the caller wishes to add more and can help + // avoid allocations; otherwise just cast as string. + FmtDateMedium(t time.Time) []byte + + // returns the long date representation of 't' for '{{ .Locale }}' + // returned as a []byte just in case the caller wishes to add more and can help + // avoid allocations; otherwise just cast as string. + FmtDateLong(t time.Time) []byte + + // returns the full date representation of 't' for '{{ .Locale }}' + // returned as a []byte just in case the caller wishes to add more and can help + // avoid allocations; otherwise just cast as string. + FmtDateFull(t time.Time) []byte + + // returns the short time representation of 't' for '{{ .Locale }}' + // returned as a []byte just in case the caller wishes to add more and can help + // avoid allocations; otherwise just cast as string. + FmtTimeShort(t time.Time) []byte + + // returns the medium time representation of 't' for '{{ .Locale }}' + // returned as a []byte just in case the caller wishes to add more and can help + // avoid allocations; otherwise just cast as string. + FmtTimeMedium(t time.Time) []byte + + // returns the long time representation of 't' for '{{ .Locale }}' + // returned as a []byte just in case the caller wishes to add more and can help + // avoid allocations; otherwise just cast as string. + FmtTimeLong(t time.Time) []byte + + // returns the full time representation of 't' for '{{ .Locale }}' + // returned as a []byte just in case the caller wishes to add more and can help + // avoid allocations; otherwise just cast as string. + FmtTimeFull(t time.Time) []byte } // String returns the string value of PluralRule |