oficina / fichas Public

Formats as Mapa's build note 85: six offered locales, header-only negotiation, Mapa's CLDR date patterns and formatter copied (level-up §6.8, aligned)

- internal/fichas/locale is Mapa's internal/mapa/locale (feat/locale
  3895499), with attribution; dates.json and its labels are pinned to
  Mapa's by sha256. To move into rastrillo (R3).
- The reader's locale is negotiated from Accept-Language alone among
  en-IE, en-GB, en-US, de, fr and es, the team's first; FICHAS_LOCALE must
  be one of them. Only their packs are linked (en, de, fr, es).
- Dates: relative words in English to two weeks, then the locale's own
  date; titles carry the locale's full date or moment.
- An echoed locale must be one of the six's.
- Sync names member events, which the index skips.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 4b35ffb5af30295cf94fd0ee1e997f294daa9b91 parent 889a3ca
19 files changed, +5,107 −195
  • internal/fichas/app.go +6 −0
  • internal/fichas/edit_handlers.go +8 −8
  • internal/fichas/formats.go +62 −102
  • internal/fichas/formats_test.go +40 −46
  • internal/fichas/handlers.go +4 −0
  • internal/fichas/index.go +3 −3
  • internal/fichas/locale/dates.json +2,176 −0
  • internal/fichas/locale/format.go +200 −0
  • internal/fichas/locale/locale.go +211 −0
  • internal/fichas/locale/locale_test.go +185 −0
  • internal/fichas/locale/testdata/date_labels.json +2,162 −0
  • internal/fichas/pane.go +1 −1
  • internal/fichas/render.go +35 −22
  • internal/fichas/schema.go +5 −4
  • internal/fichas/sync_kinds_test.go +1 −1
  • internal/fichas/templates/card_layout.html +1 −1
  • internal/fichas/templates/history.html +1 −1
  • internal/fichas/templates/index.html +3 −3
  • internal/fichas/templates/partials.html +3 −3
diff --git a/internal/fichas/app.go b/internal/fichas/app.go
index 52df7e9..5eef12f 100644
--- a/internal/fichas/app.go
+++ b/internal/fichas/app.go
@@ -4,6 +4,7 @@ import (
"amadan.net/oficina/estilo.git/chrome"
"amadan.net/oficina/estilo.git/sky"
"amadan.net/oficina/estilo.git/theme"
+ "amadan.net/oficina/fichas/internal/fichas/locale"
"context"
"log/slog"
"net/http"
@@ -57,6 +58,11 @@ func App(d *db.DB, cfg Config, logger *slog.Logger) (*http.ServeMux, *app, error
}
a := &app{db: d, sealer: cfg.Sealer, cfg: cfg, ix: NewIndex(d.G, cfg.Sealer), logger: logger}
+ // The formats Fichas offers, the team's first (§6.8): what a
+ // reader's Accept-Language is matched against.
+ if a.negotiation, err = locale.Negotiation(cfg.Locale); err != nil {
+ return nil, nil, err
+ }
a.owners = cfg.Owners
diff --git a/internal/fichas/edit_handlers.go b/internal/fichas/edit_handlers.go
index b0c3e5e..43f4f7e 100644
--- a/internal/fichas/edit_handlers.go
+++ b/internal/fichas/edit_handlers.go
@@ -38,7 +38,7 @@ const errReenter = "Enter the value again."
// spells it.
func echoedLocale(r *http.Request, key string) string {
v := r.PostForm.Get(key + ".locale")
- if id, ok := usableLocale(v); ok && id == v {
+ if localizerFor(v) != nil {
return v
}
return ""
@@ -99,7 +99,7 @@ func (a *app) setFieldValue(w http.ResponseWriter, r *http.Request) {
// answerFieldEdit says what a one-field edit did: JSON to a script, a
// redirect to everyone else.
func (a *app) answerFieldEdit(w http.ResponseWriter, r *http.Request, card CardView, f FieldView, res EditResult, err error) {
- L := localizerFor(a.pageLocale(r, f.Def.Key))
+ L := a.pageL(r, f.Def.Key)
if fe, ok := IsFormError(err); ok {
a.refuseField(w, r, card, f.Def.Key, fe[f.Def.Key])
return
@@ -142,13 +142,13 @@ func (a *app) answerFieldEdit(w http.ResponseWriter, r *http.Request, card CardV
})
}
-// pageLocale is the locale the posting page was drawn in, or the
-// reader's when the post carried none (a field with no number in it).
-func (a *app) pageLocale(r *http.Request, key string) string {
- if l := echoedLocale(r, key); l != "" {
+// pageL is the localizer the posting page was drawn with, or the
+// reader's when the post carried no echo (a field with no number).
+func (a *app) pageL(r *http.Request, key string) *ui.Localizer {
+ if l := localizerFor(echoedLocale(r, key)); l != nil {
return l
}
- return a.readerL(r).Format()
+ return a.readerL(r)
}
// refuseField answers a value a person must fix (422), writing nothing.
@@ -198,7 +198,7 @@ func showValue(L *ui.Localizer, kind, v string) string {
case kind == KindNumber:
return showNumber(L, v)
case kind == KindDate:
- return displayDate(v)
+ return longDate(L, v)
case kind == KindURL:
return displayURL(v)
}
diff --git a/internal/fichas/formats.go b/internal/fichas/formats.go
index 1762b44..b88170a 100644
--- a/internal/fichas/formats.go
+++ b/internal/fichas/formats.go
@@ -7,129 +7,58 @@ package fichas
// formatting locale.
import (
+ "context"
"fmt"
"net/http"
- "sort"
+ "net/url"
"strconv"
"strings"
- "sync"
- "amadan.net/rastrillo/rastrillo"
- "amadan.net/rastrillo/rastrillo/locales"
"amadan.net/rastrillo/rastrillo/ui"
-)
-// defaultLocale is FICHAS_LOCALE's default: Paul's teams are in Ireland.
-const defaultLocale = "en-IE"
+ "amadan.net/oficina/fichas/internal/fichas/locale"
+)
-// teamLocale is FICHAS_LOCALE, checked as rastrillo checks a configured
-// identity, and resolved to the linked CLDR locale that formats it. A
-// value that only works by falling back is refused, as an unknown zone
-// would be: a team default that silently became another is a default
-// nobody chose.
+// teamLocale is FICHAS_LOCALE, checked as Mapa checks MAPA_LOCALE (its
+// build note 85): CLDR's spelling, one of the offered locales, its pack
+// linked. en-IE unless set.
func teamLocale(v string) (string, error) {
v = strings.TrimSpace(v)
if v == "" {
- v = defaultLocale
- }
- canon, err := locales.CanonicalIdentity(v)
- if err != nil {
- return "", fmt.Errorf("fichas: FICHAS_LOCALE is %q: %w", v, err)
- }
- id, ok := usableLocale(canon)
- if !ok {
- return "", fmt.Errorf("fichas: FICHAS_LOCALE is %q, which names no locale "+
- "Fichas can format in; write a CLDR locale such as en-IE or de-DE", v)
+ v = locale.Default
}
- return id, nil
-}
-
-// usableLocale is the linked locale tag resolves to, when it resolves
-// without falling back to a default.
-func usableLocale(tag string) (string, bool) {
- res := locales.Resolve(tag)
- if res.Malformed || res.UsedDefault || res.MissingPack != "" || res.ID == "" || res.ID == "root" {
- return "", false
- }
- return res.ID, true
-}
-
-// formatLocale is the request's formatting locale: the browser's
-// Accept-Language, in q order, the first tag that resolves without
-// falling back; else the team's. A bare language that is the team
-// default's language is the team default, so a browser saying only
-// "en" gets en-IE on Paul's teams rather than CLDR's American en.
-func formatLocale(r *http.Request, team string) string {
- teamLang, _, _ := strings.Cut(team, "-")
- for _, tag := range acceptedTags(r.Header.Get("Accept-Language")) {
- if !strings.Contains(tag, "-") && strings.EqualFold(tag, teamLang) {
- return team
- }
- if id, ok := usableLocale(tag); ok {
- return id
- }
+ if err := locale.Check(v); err != nil {
+ return "", fmt.Errorf("fichas: FICHAS_LOCALE: %w", err)
}
- return team
+ return v, nil
}
-// acceptedTags are an Accept-Language header's tags, highest q first,
-// as rastrillo's locale middleware orders them. A q of 0, "*" and an
-// empty tag are left out.
-func acceptedTags(header string) []string {
- type pref struct {
- tag string
- q float64
+// browserLocale is the offered locale the request's Accept-Language
+// asks for, the team's when it asks for none (§6.8, as Mapa's
+// browserLocale). rastrillo's negotiation is handed a request carrying
+// that header and nothing else: its middleware would also take a /de/
+// path prefix and its own cookie over the header, and Fichas writes
+// neither.
+func (a *app) browserLocale(r *http.Request) *locale.Locale {
+ asked := &http.Request{URL: &url.URL{Path: "/"}, Header: http.Header{}}
+ if languages := r.Header.Values("Accept-Language"); len(languages) > 0 {
+ asked.Header["Accept-Language"] = languages
}
- var prefs []pref
- for _, part := range strings.Split(header, ",") {
- tag, params, _ := strings.Cut(strings.TrimSpace(part), ";")
- tag, q := strings.TrimSpace(tag), 1.0
- for _, p := range strings.Split(params, ";") {
- if v, ok := strings.CutPrefix(strings.TrimSpace(p), "q="); ok {
- if f, err := strconv.ParseFloat(v, 64); err == nil {
- q = f
- }
- }
- }
- if tag == "" || tag == "*" || q <= 0 {
- continue
- }
- prefs = append(prefs, pref{tag, q})
+ if chosen := locale.Get(a.negotiation.Negotiate(asked)); chosen != nil {
+ return chosen
}
- sort.SliceStable(prefs, func(i, j int) bool { return prefs[i].q > prefs[j].q })
- out := make([]string, len(prefs))
- for i, p := range prefs {
- out[i] = p.tag
- }
- return out
+ return locale.Get(a.cfg.Locale)
}
-// english is the one language Fichas speaks: rastrillo's base catalog,
-// for the framework partials' own strings.
-var english = func() func(string, ...any) string {
- l, err := rastrillo.NewLocales([]string{"en"}, "en", rastrillo.BaseCatalog(), nil)
- if err != nil {
- panic("fichas: rastrillo's English catalog: " + err.Error())
- }
- return func(key string, args ...any) string { return l.Tf("en", key, args...) }
-}()
-
-var localizers sync.Map // format -> *ui.Localizer
+type datesKey struct{}
-// localizerFor is English words with format's numbers and dates. One
-// per format, made once: a localizer holds no request state.
-func localizerFor(format string) *ui.Localizer {
- if l, ok := localizers.Load(format); ok {
- return l.(*ui.Localizer)
- }
- l, _ := localizers.LoadOrStore(format, ui.NewLocalizer("en", format, english))
- return l.(*ui.Localizer)
-}
-
-// withFormats puts the reader's localizer on every request.
+// withFormats puts the reader's locale on every request: its localizer
+// (English words, the reader's formats) and its dates.
func (a *app) withFormats(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- next.ServeHTTP(w, ui.WithLocalizer(r, localizerFor(formatLocale(r, a.cfg.Locale))))
+ chosen := a.browserLocale(r)
+ r = ui.WithLocalizer(r, chosen.Localizer())
+ next.ServeHTTP(w, r.WithContext(context.WithValue(r.Context(), datesKey{}, chosen)))
})
}
@@ -139,7 +68,38 @@ func (a *app) readerL(r *http.Request) *ui.Localizer {
if l := ui.LocalizerFrom(r); l != nil {
return l
}
- return localizerFor(a.cfg.Locale)
+ return locale.Get(a.cfg.Locale).Localizer()
+}
+
+// datesOf is the date formatter that goes with a localizer: the offered
+// locale it was made for, by its identity. nil-safe: the default's.
+func datesOf(L *ui.Localizer) *locale.Locale {
+ if L == nil {
+ return nil
+ }
+ return locale.Get(L.Identity())
+}
+
+// formats maps each offered locale's formatting id (what a page echoes,
+// rastrillo's Resolve(code).ID) to the locale.
+var formats = func() map[string]*locale.Locale {
+ out := map[string]*locale.Locale{}
+ for _, code := range locale.Offered() {
+ l := locale.Get(code)
+ if _, taken := out[l.Localizer().Format()]; !taken {
+ out[l.Localizer().Format()] = l
+ }
+ }
+ return out
+}()
+
+// localizerFor is the localizer for an echoed formatting id; nil when it
+// names no offered locale's.
+func localizerFor(format string) *ui.Localizer {
+ if l, ok := formats[format]; ok {
+ return l.Localizer()
+ }
+ return nil
}
// rastrilloNumber is rastrillo's {{number}}, called from Go for the
diff --git a/internal/fichas/formats_test.go b/internal/fichas/formats_test.go
index 8996e17..f668e61 100644
--- a/internal/fichas/formats_test.go
+++ b/internal/fichas/formats_test.go
@@ -1,72 +1,61 @@
package fichas
import (
- "net/http/httptest"
+ "crypto/sha256"
+ "fmt"
+ "os"
"testing"
- "amadan.net/rastrillo/rastrillo/locales"
+ "amadan.net/oficina/fichas/internal/fichas/locale"
)
-// TestEveryDrawnNumberReadsBack is LU17's round trip: for every linked
-// locale, every number Fichas draws, grouped or as an editor's seed,
-// reads back through the interim reading as the same value.
+// TestEveryDrawnNumberReadsBack is LU17's round trip: for every offered
+// locale, every number Fichas draws, and every seed, reads back through
+// the interim reading as the same value.
func TestEveryDrawnNumberReadsBack(t *testing.T) {
values := []string{"0", "7", "-12.5", "1200.5", "1234567.125", "0.001", "987654321", "-1000000", "123456789012345678901234567.125"}
- failed := 0
- for _, id := range locales.LinkedIDs() {
- if id == "root" {
- continue
- }
- L := localizerFor(id)
+ for _, code := range locale.Offered() {
+ L := locale.Get(code).Localizer()
for _, v := range values {
- for _, shown := range []string{showNumber(L, v), seedNumber(id, v)} {
- got, err := readNumber(id, shown)
- if err != nil || got != v {
- failed++
- if failed < 40 {
- t.Errorf("%s: %s drawn as %q reads back as %q, %v", id, v, shown, got, err)
- }
+ for _, shown := range []string{showNumber(L, v), seedNumber(L.Format(), v)} {
+ if got, err := readNumber(L.Format(), shown); err != nil || got != v {
+ t.Errorf("%s: %s drawn as %q reads back as %q, %v", code, v, shown, got, err)
}
}
}
}
- if failed > 0 {
- t.Errorf("%d failures in all", failed)
- }
-}
-
-func TestTheFormatLocaleFollowsTheBrowser(t *testing.T) {
- for _, c := range []struct{ header, want string }{
- {"de-DE,de;q=0.9,en;q=0.8", "de"},
- {"en", "en-IE"},
- {"en-US,en;q=0.9", "en"},
- {"xx-YY, fr-FR;q=0.5", "fr"},
- {"en-GB;q=0.2, de-CH;q=0.9", "de-CH"},
- {"*", "en-IE"},
- {"", "en-IE"},
- {"!!", "en-IE"},
- } {
- r := httptest.NewRequest("GET", "/", nil)
- r.Header.Set("Accept-Language", c.header)
- if got := formatLocale(r, "en-IE"); got != c.want {
- t.Errorf("Accept-Language %q: got %q, want %q", c.header, got, c.want)
- }
- }
}
-func TestAnUnusableTeamLocaleRefusesBoot(t *testing.T) {
- for _, bad := range []string{"xx", "en_IE", "not a locale", "zz-ZZ"} {
+func TestAnUnofferedTeamLocaleRefusesBoot(t *testing.T) {
+ for _, bad := range []string{"xx", "en_IE", "not a locale", "ja", "de-AT"} {
if _, err := teamLocale(bad); err == nil {
t.Errorf("FICHAS_LOCALE=%q was accepted", bad)
}
}
- for v, want := range map[string]string{"": "en-IE", "de-DE": "de", "en-US": "en", "pt-PT": "pt-PT"} {
+ for v, want := range map[string]string{"": "en-IE", "de": "de", "en-US": "en-US", "fr": "fr"} {
if got, err := teamLocale(v); err != nil || got != want {
t.Errorf("FICHAS_LOCALE=%q: got %q, %v; want %q", v, got, err, want)
}
}
}
+// The copied date patterns are Mapa's, byte for byte (§6.8): a change
+// comes from Mapa's make locale-dates, never from an edit here.
+func TestTheDatePatternsAreMapas(t *testing.T) {
+ for file, want := range map[string]string{
+ "locale/dates.json": datesJSONSum,
+ "locale/testdata/date_labels.json": dateLabelsSum,
+ } {
+ b, err := os.ReadFile(file)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if got := fmt.Sprintf("%x", sha256.Sum256(b)); got != want {
+ t.Errorf("%s is not Mapa's (sha256 %s); copy it again from Mapa's feat/locale", file, got)
+ }
+ }
+}
+
func TestTheInterimReadingIsTheLocalesOwnOnly(t *testing.T) {
for _, c := range []struct{ locale, in, want string }{
{"en-IE", "1,200.5", "1200.5"},
@@ -79,9 +68,7 @@ func TestTheInterimReadingIsTheLocalesOwnOnly(t *testing.T) {
{"de", "1.500", "1500"},
{"fr", "1 200,5", "1200.5"},
{"fr", "1 200,5", "1200.5"},
- {"hi", "12,34,567", "1234567"},
- {"de-CH", "1'200.5", "1200.5"},
- {"de-CH", "1’200.5", "1200.5"},
+ {"es", "1.200,5", "1200.5"},
{"en-IE", "", ""},
} {
got, err := readNumber(c.locale, c.in)
@@ -123,3 +110,10 @@ func TestAnUnchangedSeedIsTheStoredValue(t *testing.T) {
t.Errorf("a typed 1,200 over 1200: got %q, %v", got, err)
}
}
+
+// The sha256 of Mapa's dates.json and date_labels.json at feat/locale
+// 3895499.
+const (
+ datesJSONSum = "f46611c8ea9cb731b9c0f1ceea4e96262a8c52a05846e718c8c12068df0a18b4"
+ dateLabelsSum = "ca78054f2948cc68401de3d7316e4a2a8c4a19c0a0df9e229a0d13fbb4eef81d"
+)
diff --git a/internal/fichas/handlers.go b/internal/fichas/handlers.go
index f112bfe..d76e913 100644
--- a/internal/fichas/handlers.go
+++ b/internal/fichas/handlers.go
@@ -1,6 +1,7 @@
package fichas
import (
+ "amadan.net/rastrillo/rastrillo"
"errors"
"log/slog"
"net/http"
@@ -39,6 +40,9 @@ type app struct {
testIdentity string
allowUnauthenticated bool
logger *slog.Logger
+ // negotiation matches a reader's Accept-Language to the formats
+ // Fichas offers (formats.go).
+ negotiation *rastrillo.Locales
}
// UseAuth attaches the sign-in flow. Called by main after the mailer
diff --git a/internal/fichas/index.go b/internal/fichas/index.go
index f9bdccb..9a7ff38 100644
--- a/internal/fichas/index.go
+++ b/internal/fichas/index.go
@@ -122,9 +122,9 @@ func (ix *Index) Sync(ctx context.Context) error {
case ObjectEntry:
// The card-level entry_added event carries the card; the
// entry's own event adds nothing the index needs.
- case ObjectView, ObjectFile, ObjectDraft:
- // Nothing the index holds: views are read per request, files
- // and drafts are not in it.
+ case ObjectView, ObjectFile, ObjectDraft, ObjectMember:
+ // Nothing the index holds: views are read per request; files,
+ // drafts and a person's own format are not in it.
case ObjectType, ObjectGroup:
types[e.ObjectID] = true
case ObjectField:
diff --git a/internal/fichas/locale/dates.json b/internal/fichas/locale/dates.json
new file mode 100644
index 0000000..88d35da
--- /dev/null
+++ b/internal/fichas/locale/dates.json
@@ -0,0 +1,2176 @@
+{
+ "about": "CLDR date patterns for the locales Mapa offers, read from ICU by editor/gen-dates.mjs (make locale-dates). Weekday lists run Sunday first; firstDay is Go's time.Weekday. Do not edit by hand.",
+ "source": {
+ "icu": "78.3",
+ "cldr": "48.0",
+ "unicode": "17.0"
+ },
+ "offered": [
+ "en-IE",
+ "en-GB",
+ "en-US",
+ "de",
+ "fr",
+ "es"
+ ],
+ "locales": {
+ "en-IE": {
+ "firstDay": 1,
+ "order": "dmy",
+ "separator": "/",
+ "weekdays": [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ],
+ "narrow": [
+ "S",
+ "M",
+ "T",
+ "W",
+ "T",
+ "F",
+ "S"
+ ],
+ "patterns": {
+ "day": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "weekdays": [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "dayYear": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "weekdays": [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "short": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "weekdays": [
+ "Sun",
+ "Mon",
+ "Tue",
+ "Wed",
+ "Thu",
+ "Fri",
+ "Sat"
+ ],
+ "months": [
+ "Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sept",
+ "Oct",
+ "Nov",
+ "Dec"
+ ]
+ },
+ "date": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "dateYear": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "monthYear": {
+ "parts": [
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "month": {
+ "parts": [
+ {
+ "t": "month"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "year": {
+ "parts": [
+ {
+ "t": "year"
+ }
+ ]
+ },
+ "time": {
+ "parts": [
+ {
+ "t": "hour",
+ "pad": true,
+ "cycle": "h23"
+ },
+ {
+ "t": "lit",
+ "v": ":"
+ },
+ {
+ "t": "minute"
+ }
+ ]
+ },
+ "stamp": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ },
+ {
+ "t": "lit",
+ "v": " at "
+ },
+ {
+ "t": "hour",
+ "pad": true,
+ "cycle": "h23"
+ },
+ {
+ "t": "lit",
+ "v": ":"
+ },
+ {
+ "t": "minute"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ }
+ }
+ },
+ "en-GB": {
+ "firstDay": 1,
+ "order": "dmy",
+ "separator": "/",
+ "weekdays": [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ],
+ "narrow": [
+ "S",
+ "M",
+ "T",
+ "W",
+ "T",
+ "F",
+ "S"
+ ],
+ "patterns": {
+ "day": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "weekdays": [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "dayYear": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "weekdays": [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "short": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "weekdays": [
+ "Sun",
+ "Mon",
+ "Tue",
+ "Wed",
+ "Thu",
+ "Fri",
+ "Sat"
+ ],
+ "months": [
+ "Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sept",
+ "Oct",
+ "Nov",
+ "Dec"
+ ]
+ },
+ "date": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "dateYear": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "monthYear": {
+ "parts": [
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "month": {
+ "parts": [
+ {
+ "t": "month"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "year": {
+ "parts": [
+ {
+ "t": "year"
+ }
+ ]
+ },
+ "time": {
+ "parts": [
+ {
+ "t": "hour",
+ "pad": true,
+ "cycle": "h23"
+ },
+ {
+ "t": "lit",
+ "v": ":"
+ },
+ {
+ "t": "minute"
+ }
+ ]
+ },
+ "stamp": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ },
+ {
+ "t": "lit",
+ "v": " at "
+ },
+ {
+ "t": "hour",
+ "pad": true,
+ "cycle": "h23"
+ },
+ {
+ "t": "lit",
+ "v": ":"
+ },
+ {
+ "t": "minute"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ }
+ }
+ },
+ "en-US": {
+ "firstDay": 0,
+ "order": "mdy",
+ "separator": "/",
+ "weekdays": [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ],
+ "narrow": [
+ "S",
+ "M",
+ "T",
+ "W",
+ "T",
+ "F",
+ "S"
+ ],
+ "patterns": {
+ "day": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "day",
+ "pad": false
+ }
+ ],
+ "weekdays": [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "dayYear": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "weekdays": [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "short": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "day",
+ "pad": false
+ }
+ ],
+ "weekdays": [
+ "Sun",
+ "Mon",
+ "Tue",
+ "Wed",
+ "Thu",
+ "Fri",
+ "Sat"
+ ],
+ "months": [
+ "Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec"
+ ]
+ },
+ "date": {
+ "parts": [
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "day",
+ "pad": false
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "dateYear": {
+ "parts": [
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "monthYear": {
+ "parts": [
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "month": {
+ "parts": [
+ {
+ "t": "month"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ]
+ },
+ "year": {
+ "parts": [
+ {
+ "t": "year"
+ }
+ ]
+ },
+ "time": {
+ "parts": [
+ {
+ "t": "hour",
+ "pad": false,
+ "cycle": "h12"
+ },
+ {
+ "t": "lit",
+ "v": ":"
+ },
+ {
+ "t": "minute"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "period"
+ }
+ ],
+ "periods": [
+ "AM",
+ "PM"
+ ]
+ },
+ "stamp": {
+ "parts": [
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "year"
+ },
+ {
+ "t": "lit",
+ "v": " at "
+ },
+ {
+ "t": "hour",
+ "pad": false,
+ "cycle": "h12"
+ },
+ {
+ "t": "lit",
+ "v": ":"
+ },
+ {
+ "t": "minute"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "period"
+ }
+ ],
+ "months": [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December"
+ ],
+ "periods": [
+ "AM",
+ "PM"
+ ]
+ }
+ }
+ },
+ "de": {
+ "firstDay": 1,
+ "order": "dmy",
+ "separator": ".",
+ "weekdays": [
+ "Sonntag",
+ "Montag",
+ "Dienstag",
+ "Mittwoch",
+ "Donnerstag",
+ "Freitag",
+ "Samstag"
+ ],
+ "narrow": [
+ "S",
+ "M",
+ "D",
+ "M",
+ "D",
+ "F",
+ "S"
+ ],
+ "patterns": {
+ "day": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": ". "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "weekdays": [
+ "Sonntag",
+ "Montag",
+ "Dienstag",
+ "Mittwoch",
+ "Donnerstag",
+ "Freitag",
+ "Samstag"
+ ],
+ "months": [
+ "Januar",
+ "Februar",
+ "März",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Dezember"
+ ]
+ },
+ "dayYear": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": ". "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "weekdays": [
+ "Sonntag",
+ "Montag",
+ "Dienstag",
+ "Mittwoch",
+ "Donnerstag",
+ "Freitag",
+ "Samstag"
+ ],
+ "months": [
+ "Januar",
+ "Februar",
+ "März",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Dezember"
+ ]
+ },
+ "short": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": ". "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "weekdays": [
+ "So.",
+ "Mo.",
+ "Di.",
+ "Mi.",
+ "Do.",
+ "Fr.",
+ "Sa."
+ ],
+ "months": [
+ "Jan.",
+ "Feb.",
+ "März",
+ "Apr.",
+ "Mai",
+ "Juni",
+ "Juli",
+ "Aug.",
+ "Sept.",
+ "Okt.",
+ "Nov.",
+ "Dez."
+ ]
+ },
+ "date": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": ". "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "months": [
+ "Januar",
+ "Februar",
+ "März",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Dezember"
+ ]
+ },
+ "dateYear": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": ". "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "months": [
+ "Januar",
+ "Februar",
+ "März",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Dezember"
+ ]
+ },
+ "monthYear": {
+ "parts": [
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "months": [
+ "Januar",
+ "Februar",
+ "März",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Dezember"
+ ]
+ },
+ "month": {
+ "parts": [
+ {
+ "t": "month"
+ }
+ ],
+ "months": [
+ "Januar",
+ "Februar",
+ "März",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Dezember"
+ ]
+ },
+ "year": {
+ "parts": [
+ {
+ "t": "year"
+ }
+ ]
+ },
+ "time": {
+ "parts": [
+ {
+ "t": "hour",
+ "pad": true,
+ "cycle": "h23"
+ },
+ {
+ "t": "lit",
+ "v": ":"
+ },
+ {
+ "t": "minute"
+ }
+ ]
+ },
+ "stamp": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": ". "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ },
+ {
+ "t": "lit",
+ "v": " um "
+ },
+ {
+ "t": "hour",
+ "pad": true,
+ "cycle": "h23"
+ },
+ {
+ "t": "lit",
+ "v": ":"
+ },
+ {
+ "t": "minute"
+ }
+ ],
+ "months": [
+ "Januar",
+ "Februar",
+ "März",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Dezember"
+ ]
+ }
+ }
+ },
+ "fr": {
+ "firstDay": 1,
+ "order": "dmy",
+ "separator": "/",
+ "weekdays": [
+ "dimanche",
+ "lundi",
+ "mardi",
+ "mercredi",
+ "jeudi",
+ "vendredi",
+ "samedi"
+ ],
+ "narrow": [
+ "D",
+ "L",
+ "M",
+ "M",
+ "J",
+ "V",
+ "S"
+ ],
+ "patterns": {
+ "day": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "weekdays": [
+ "dimanche",
+ "lundi",
+ "mardi",
+ "mercredi",
+ "jeudi",
+ "vendredi",
+ "samedi"
+ ],
+ "months": [
+ "janvier",
+ "février",
+ "mars",
+ "avril",
+ "mai",
+ "juin",
+ "juillet",
+ "août",
+ "septembre",
+ "octobre",
+ "novembre",
+ "décembre"
+ ]
+ },
+ "dayYear": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "weekdays": [
+ "dimanche",
+ "lundi",
+ "mardi",
+ "mercredi",
+ "jeudi",
+ "vendredi",
+ "samedi"
+ ],
+ "months": [
+ "janvier",
+ "février",
+ "mars",
+ "avril",
+ "mai",
+ "juin",
+ "juillet",
+ "août",
+ "septembre",
+ "octobre",
+ "novembre",
+ "décembre"
+ ]
+ },
+ "short": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "weekdays": [
+ "dim.",
+ "lun.",
+ "mar.",
+ "mer.",
+ "jeu.",
+ "ven.",
+ "sam."
+ ],
+ "months": [
+ "janv.",
+ "févr.",
+ "mars",
+ "avr.",
+ "mai",
+ "juin",
+ "juil.",
+ "août",
+ "sept.",
+ "oct.",
+ "nov.",
+ "déc."
+ ]
+ },
+ "date": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "months": [
+ "janvier",
+ "février",
+ "mars",
+ "avril",
+ "mai",
+ "juin",
+ "juillet",
+ "août",
+ "septembre",
+ "octobre",
+ "novembre",
+ "décembre"
+ ]
+ },
+ "dateYear": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "months": [
+ "janvier",
+ "février",
+ "mars",
+ "avril",
+ "mai",
+ "juin",
+ "juillet",
+ "août",
+ "septembre",
+ "octobre",
+ "novembre",
+ "décembre"
+ ]
+ },
+ "monthYear": {
+ "parts": [
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "months": [
+ "janvier",
+ "février",
+ "mars",
+ "avril",
+ "mai",
+ "juin",
+ "juillet",
+ "août",
+ "septembre",
+ "octobre",
+ "novembre",
+ "décembre"
+ ]
+ },
+ "month": {
+ "parts": [
+ {
+ "t": "month"
+ }
+ ],
+ "months": [
+ "janvier",
+ "février",
+ "mars",
+ "avril",
+ "mai",
+ "juin",
+ "juillet",
+ "août",
+ "septembre",
+ "octobre",
+ "novembre",
+ "décembre"
+ ]
+ },
+ "year": {
+ "parts": [
+ {
+ "t": "year"
+ }
+ ]
+ },
+ "time": {
+ "parts": [
+ {
+ "t": "hour",
+ "pad": true,
+ "cycle": "h23"
+ },
+ {
+ "t": "lit",
+ "v": ":"
+ },
+ {
+ "t": "minute"
+ }
+ ]
+ },
+ "stamp": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "year"
+ },
+ {
+ "t": "lit",
+ "v": " à "
+ },
+ {
+ "t": "hour",
+ "pad": true,
+ "cycle": "h23"
+ },
+ {
+ "t": "lit",
+ "v": ":"
+ },
+ {
+ "t": "minute"
+ }
+ ],
+ "months": [
+ "janvier",
+ "février",
+ "mars",
+ "avril",
+ "mai",
+ "juin",
+ "juillet",
+ "août",
+ "septembre",
+ "octobre",
+ "novembre",
+ "décembre"
+ ]
+ }
+ }
+ },
+ "es": {
+ "firstDay": 1,
+ "order": "dmy",
+ "separator": "/",
+ "weekdays": [
+ "domingo",
+ "lunes",
+ "martes",
+ "miércoles",
+ "jueves",
+ "viernes",
+ "sábado"
+ ],
+ "narrow": [
+ "D",
+ "L",
+ "M",
+ "X",
+ "J",
+ "V",
+ "S"
+ ],
+ "patterns": {
+ "day": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " de "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "weekdays": [
+ "domingo",
+ "lunes",
+ "martes",
+ "miércoles",
+ "jueves",
+ "viernes",
+ "sábado"
+ ],
+ "months": [
+ "enero",
+ "febrero",
+ "marzo",
+ "abril",
+ "mayo",
+ "junio",
+ "julio",
+ "agosto",
+ "septiembre",
+ "octubre",
+ "noviembre",
+ "diciembre"
+ ]
+ },
+ "dayYear": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " de "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " de "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "weekdays": [
+ "domingo",
+ "lunes",
+ "martes",
+ "miércoles",
+ "jueves",
+ "viernes",
+ "sábado"
+ ],
+ "months": [
+ "enero",
+ "febrero",
+ "marzo",
+ "abril",
+ "mayo",
+ "junio",
+ "julio",
+ "agosto",
+ "septiembre",
+ "octubre",
+ "noviembre",
+ "diciembre"
+ ]
+ },
+ "short": {
+ "parts": [
+ {
+ "t": "weekday"
+ },
+ {
+ "t": "lit",
+ "v": ", "
+ },
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "weekdays": [
+ "dom",
+ "lun",
+ "mar",
+ "mié",
+ "jue",
+ "vie",
+ "sáb"
+ ],
+ "months": [
+ "ene",
+ "feb",
+ "mar",
+ "abr",
+ "may",
+ "jun",
+ "jul",
+ "ago",
+ "sept",
+ "oct",
+ "nov",
+ "dic"
+ ]
+ },
+ "date": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " de "
+ },
+ {
+ "t": "month"
+ }
+ ],
+ "months": [
+ "enero",
+ "febrero",
+ "marzo",
+ "abril",
+ "mayo",
+ "junio",
+ "julio",
+ "agosto",
+ "septiembre",
+ "octubre",
+ "noviembre",
+ "diciembre"
+ ]
+ },
+ "dateYear": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " de "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " de "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "months": [
+ "enero",
+ "febrero",
+ "marzo",
+ "abril",
+ "mayo",
+ "junio",
+ "julio",
+ "agosto",
+ "septiembre",
+ "octubre",
+ "noviembre",
+ "diciembre"
+ ]
+ },
+ "monthYear": {
+ "parts": [
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " de "
+ },
+ {
+ "t": "year"
+ }
+ ],
+ "months": [
+ "enero",
+ "febrero",
+ "marzo",
+ "abril",
+ "mayo",
+ "junio",
+ "julio",
+ "agosto",
+ "septiembre",
+ "octubre",
+ "noviembre",
+ "diciembre"
+ ]
+ },
+ "month": {
+ "parts": [
+ {
+ "t": "month"
+ }
+ ],
+ "months": [
+ "enero",
+ "febrero",
+ "marzo",
+ "abril",
+ "mayo",
+ "junio",
+ "julio",
+ "agosto",
+ "septiembre",
+ "octubre",
+ "noviembre",
+ "diciembre"
+ ]
+ },
+ "year": {
+ "parts": [
+ {
+ "t": "year"
+ }
+ ]
+ },
+ "time": {
+ "parts": [
+ {
+ "t": "hour",
+ "pad": false,
+ "cycle": "h23"
+ },
+ {
+ "t": "lit",
+ "v": ":"
+ },
+ {
+ "t": "minute"
+ }
+ ]
+ },
+ "stamp": {
+ "parts": [
+ {
+ "t": "day",
+ "pad": false
+ },
+ {
+ "t": "lit",
+ "v": " de "
+ },
+ {
+ "t": "month"
+ },
+ {
+ "t": "lit",
+ "v": " de "
+ },
+ {
+ "t": "year"
+ },
+ {
+ "t": "lit",
+ "v": " a las "
+ },
+ {
+ "t": "hour",
+ "pad": false,
+ "cycle": "h23"
+ },
+ {
+ "t": "lit",
+ "v": ":"
+ },
+ {
+ "t": "minute"
+ }
+ ],
+ "months": [
+ "enero",
+ "febrero",
+ "marzo",
+ "abril",
+ "mayo",
+ "junio",
+ "julio",
+ "agosto",
+ "septiembre",
+ "octubre",
+ "noviembre",
+ "diciembre"
+ ]
+ }
+ }
+ }
+ }
+}
diff --git a/internal/fichas/locale/format.go b/internal/fichas/locale/format.go
new file mode 100644
index 0000000..18385b3
--- /dev/null
+++ b/internal/fichas/locale/format.go
@@ -0,0 +1,200 @@
+package locale
+
+import (
+ "slices"
+ "strconv"
+ "strings"
+ "time"
+)
+
+// moment is the fields a pattern reads: month 1 to 12, weekday 0 for
+// Sunday, the hour 0 to 23.
+type moment struct {
+ year, month, day, weekday, hour, minute int
+}
+
+func momentOf(at time.Time) moment {
+ return moment{year: at.Year(), month: int(at.Month()), day: at.Day(),
+ weekday: int(at.Weekday()), hour: at.Hour(), minute: at.Minute()}
+}
+
+func padded(value int, pad bool) string {
+ if pad && value < 10 {
+ return "0" + strconv.Itoa(value)
+ }
+ return strconv.Itoa(value)
+}
+
+// hourOf is the hour as the pattern's cycle counts it.
+func hourOf(hour int, cycle string) int {
+ switch cycle {
+ case "h12":
+ if hour%12 == 0 {
+ return 12
+ }
+ return hour % 12
+ case "h11":
+ return hour % 12
+ case "h24":
+ if hour == 0 {
+ return 24
+ }
+ }
+ return hour
+}
+
+// write draws the pattern for at: editor/dates.mjs's formatWith,
+// line for line.
+func (shape *pattern) write(at moment) string {
+ var out strings.Builder
+ for _, part := range shape.Parts {
+ switch part.Type {
+ case "lit":
+ out.WriteString(part.Value)
+ case "weekday":
+ out.WriteString(shape.Weekdays[at.weekday])
+ case "month":
+ out.WriteString(shape.Months[at.month-1])
+ case "monthNumber":
+ out.WriteString(padded(at.month, part.Pad))
+ case "day":
+ out.WriteString(padded(at.day, part.Pad))
+ case "year":
+ out.WriteString(strconv.Itoa(at.year))
+ case "hour":
+ out.WriteString(padded(hourOf(at.hour, part.Cycle), part.Pad))
+ case "minute":
+ out.WriteString(padded(at.minute, true))
+ case "period":
+ out.WriteString(shape.Periods[min(at.hour/12, 1)])
+ }
+ }
+ return out.String()
+}
+
+// Format is one kind of date (dates.json's kinds) for a moment, in its
+// own zone.
+func (in *Locale) Format(kind string, at time.Time) string {
+ return in.orDefault().data.Patterns[kind].write(momentOf(at))
+}
+
+// day reads an ISO date, or reports it is none.
+func day(iso string) (time.Time, bool) {
+ at, err := time.Parse(time.DateOnly, iso)
+ return at, err == nil && len(iso) == len(time.DateOnly)
+}
+
+// iso formats an ISO date as kind; anything that is no date is shown
+// as it is.
+func (in *Locale) iso(kind, iso string) string {
+ at, ok := day(iso)
+ if !ok {
+ return iso
+ }
+ return in.Format(kind, at)
+}
+
+// Day is a date as a chip shows it: "Thursday 12 November" in en-GB,
+// with the year when it is not thisYear. "" for text that is no date.
+func (in *Locale) Day(iso string, thisYear int) string {
+ at, ok := day(iso)
+ if !ok {
+ return ""
+ }
+ if at.Year() == thisYear {
+ return in.Format("day", at)
+ }
+ return in.Format("dayYear", at)
+}
+
+// Long is an ISO date in full, year and all: "Thursday 12 November
+// 2026" in en-GB.
+func (in *Locale) Long(iso string) string { return in.iso("dayYear", iso) }
+
+// DayTitle is a daily note's title, the full date up to its year, which
+// YearPart sets apart: together they are Long, written as the locale
+// composes it ("martes, 17 de noviembre" and " de 2026"; review round
+// 8, L4).
+func (in *Locale) DayTitle(iso string) string {
+ head, _ := in.titleParts(iso)
+ return head
+}
+
+// YearPart is the rest of the full date from the separator before its
+// year: " 2026", ", 2026" in en-US. "" for text that is no date.
+func (in *Locale) YearPart(iso string) string {
+ _, tail := in.titleParts(iso)
+ return tail
+}
+
+// titleParts cuts dayYear before the literal ahead of its year. A
+// pattern whose year comes first is not cut.
+func (in *Locale) titleParts(iso string) (string, string) {
+ at, ok := day(iso)
+ if !ok {
+ return iso, ""
+ }
+ shape := in.orDefault().data.Patterns["dayYear"]
+ cut := slices.IndexFunc(shape.Parts, func(part field) bool {
+ return part.Type == "year"
+ })
+ if cut > 0 && shape.Parts[cut-1].Type == "lit" {
+ cut--
+ }
+ if cut <= 0 {
+ return shape.write(momentOf(at)), ""
+ }
+ head, tail := *shape, *shape
+ head.Parts, tail.Parts = shape.Parts[:cut], shape.Parts[cut:]
+ return head.write(momentOf(at)), tail.write(momentOf(at))
+}
+
+// Short is a day on a pill: "Thu 12 Nov" in en-GB.
+func (in *Locale) Short(iso string) string { return in.iso("short", iso) }
+
+// Time is a time of day: "21:09", or "9:09 PM" in en-US.
+func (in *Locale) Time(at time.Time) string { return in.Format("time", at) }
+
+// Stamp is a moment in full, for a title: "12 November 2026 at 21:09".
+func (in *Locale) Stamp(at time.Time) string { return in.Format("stamp", at) }
+
+// FirstDay is the day the locale's weeks start on.
+func (in *Locale) FirstDay() time.Weekday {
+ return time.Weekday(in.orDefault().data.FirstDay)
+}
+
+// WeekStart is the first day of the week holding day.
+func (in *Locale) WeekStart(day time.Time) time.Time {
+ back := (int(day.Weekday()) - int(in.FirstDay()) + 7) % 7
+ return day.AddDate(0, 0, -back)
+}
+
+// Head is a calendar's column: the day's name, and its letter.
+type Head struct{ Name, Letter string }
+
+// Heads are the week's columns from its first day.
+func (in *Locale) Heads() []Head {
+ in = in.orDefault()
+ out := make([]Head, 7)
+ for column := range out {
+ weekday := (in.data.FirstDay + column) % 7
+ out[column] = Head{Name: in.data.Weekdays[weekday],
+ Letter: in.data.Narrow[weekday]}
+ }
+ return out
+}
+
+// Letter is a weekday's narrow name: "M" for Monday in English.
+func (in *Locale) Letter(weekday time.Weekday) string {
+ return in.orDefault().data.Narrow[weekday]
+}
+
+// Order is how the locale writes a date in numbers: "dmy", "mdy" or
+// "ymd".
+func (in *Locale) Order() string { return in.orDefault().data.Order }
+
+// Separator is the mark between a date's numbers: "/", or "." in
+// German.
+func (in *Locale) Separator() string {
+ return in.orDefault().data.Separator
+}
diff --git a/internal/fichas/locale/locale.go b/internal/fichas/locale/locale.go
new file mode 100644
index 0000000..41ad1e3
--- /dev/null
+++ b/internal/fichas/locale/locale.go
@@ -0,0 +1,211 @@
+// Package locale is how Fichas writes dates, times and numbers for the
+// person reading (level-up spec §6.8). The interface stays English; only
+// the formats change.
+//
+// Copied from Mapa (feat/locale, 3895499: internal/mapa/locale, its
+// build note 85, Fable APPROVED) so two Oficina apps never write a
+// reader's date two ways. Changes from Mapa's: this comment, the
+// localizer's translator (rastrillo's English base catalog rather than
+// keys as their own text) and "Fichas" in Check's refusal. dates.json and
+// testdata/date_labels.json are Mapa's, byte for byte, and are never
+// regenerated here: a change comes from Mapa's `make locale-dates`. The
+// package should move into rastrillo (§6.8, R3), so that no third copy
+// is made.
+//
+// The locale is negotiated from the request's Accept-Language among the
+// locales offered here, the team's own (FICHAS_LOCALE, en-IE unless set)
+// first. Numbers go through rastrillo's own number function, which reads
+// the CLDR pack each locale links. rastrillo's packs hold no date data,
+// so the CLDR date patterns are dates.json, which Mapa's
+// editor/gen-dates.mjs reads out of ICU; format.go interprets them.
+package locale
+
+import (
+ _ "embed"
+ "encoding/json"
+ "fmt"
+ "slices"
+
+ "amadan.net/rastrillo/rastrillo"
+ "amadan.net/rastrillo/rastrillo/locales"
+ "amadan.net/rastrillo/rastrillo/ui"
+
+ // The packs the offered locales are formatted from: rastrillo
+ // refuses a locale whose pack this binary does not link.
+ _ "amadan.net/rastrillo/rastrillo/locales/de"
+ _ "amadan.net/rastrillo/rastrillo/locales/en"
+ _ "amadan.net/rastrillo/rastrillo/locales/es"
+ _ "amadan.net/rastrillo/rastrillo/locales/fr"
+)
+
+// Default is the team's locale when MAPA_LOCALE is unset.
+const Default = "en-IE"
+
+//go:embed dates.json
+var datesJSON []byte
+
+// field is one part of a pattern: a literal, or a date's field.
+type field struct {
+ Type string `json:"t"`
+ Value string `json:"v,omitempty"`
+ Pad bool `json:"pad,omitempty"`
+ Cycle string `json:"cycle,omitempty"`
+}
+
+// pattern is one kind of date in one locale, with the names it uses.
+type pattern struct {
+ Parts []field `json:"parts"`
+ Weekdays []string `json:"weekdays,omitempty"`
+ Months []string `json:"months,omitempty"`
+ Periods []string `json:"periods,omitempty"`
+}
+
+// data is one locale's entry in dates.json.
+type data struct {
+ FirstDay int `json:"firstDay"`
+ Order string `json:"order"`
+ // Separator is the mark between a numeric date's numbers.
+ Separator string `json:"separator"`
+ Weekdays []string `json:"weekdays"`
+ Narrow []string `json:"narrow"`
+ Patterns map[string]*pattern `json:"patterns"`
+}
+
+// Locale is one offered locale: its date patterns and the rastrillo
+// localizer its numbers are written with. Its methods treat a nil
+// Locale as the default's.
+type Locale struct {
+ code string
+ // L is rastrillo's localizer, what {{number L n}} is handed.
+ L *ui.Localizer
+ data data
+}
+
+var (
+ offered []string
+ byCode = map[string]*Locale{}
+)
+
+func init() {
+ var file struct {
+ Offered []string `json:"offered"`
+ Locales map[string]data `json:"locales"`
+ }
+ if err := json.Unmarshal(datesJSON, &file); err != nil {
+ panic("locale: dates.json: " + err.Error())
+ }
+ offered = file.Offered
+ for _, code := range offered {
+ byCode[code] = &Locale{code: code, data: file.Locales[code],
+ L: ui.NewLocalizer(code, locales.Resolve(code).ID,
+ english)}
+ }
+}
+
+// english is the localizer's translator: Fichas' own text is English
+// literals, and the framework partials' keys (rastrillo.ui.*, a money
+// field's errors) read rastrillo's English base catalog.
+var english = func() func(string, ...any) string {
+ l, err := rastrillo.NewLocales([]string{"en"}, "en", rastrillo.BaseCatalog(), nil)
+ if err != nil {
+ panic("locale: rastrillo's English catalog: " + err.Error())
+ }
+ return func(key string, args ...any) string { return l.Tf("en", key, args...) }
+}()
+
+// names are the offered locales in English, the interface's language.
+var names = map[string]string{"en-IE": "English (Ireland)",
+ "en-GB": "English (UK)", "en-US": "English (US)", "de": "German",
+ "fr": "French", "es": "Spanish"}
+
+// Name is an offered locale's name in English; the code for one with
+// none.
+func Name(code string) string {
+ if name, ok := names[code]; ok {
+ return name
+ }
+ return code
+}
+
+// Code is the locale's code, the default's for a nil one.
+func (in *Locale) Code() string { return in.orDefault().code }
+
+// Offered is every locale Fichas can write in, in dates.json's order.
+func Offered() []string { return slices.Clone(offered) }
+
+// Get is the offered locale code names, or nil.
+func Get(code string) *Locale { return byCode[code] }
+
+// Localizer is rastrillo's localizer for the locale, the default's for
+// a nil one: what {{number L n}} is handed.
+func (in *Locale) Localizer() *ui.Localizer { return in.orDefault().L }
+
+// orDefault is in, or the default locale for a nil in.
+func (in *Locale) orDefault() *Locale {
+ if in == nil {
+ return byCode[Default]
+ }
+ return in
+}
+
+// Check refuses a team locale Fichas cannot write in: not CLDR's
+// spelling, not offered, or offered without its pack linked.
+func Check(team string) error {
+ if _, err := locales.CanonicalIdentity(team); err != nil {
+ return err
+ }
+ if Get(team) == nil {
+ return fmt.Errorf("%q is not a locale Fichas offers; use one of %v",
+ team, offered)
+ }
+ _, err := locales.CheckConfig(team, offered)
+ return err
+}
+
+// Negotiation is rastrillo's locale set for a team: the offered
+// locales with the team's first, so a reader whose language Fichas
+// offers only in other regions (en-AU, say) gets the team's.
+func Negotiation(team string) (*rastrillo.Locales, error) {
+ codes := append([]string{team}, slices.DeleteFunc(Offered(),
+ func(code string) bool { return code == team })...)
+ return rastrillo.NewLocales(codes, team, nil, nil)
+}
+
+// number is rastrillo's number template function, which formats from
+// the localizer's CLDR pack.
+var number = ui.Funcs()["number"].(func(...any) (any, error))
+
+// Number is a count as the locale writes it: 1,234 or 1.234.
+func (in *Locale) Number(count int) string {
+ written, err := number(in.Localizer(), count)
+ if err != nil {
+ return fmt.Sprint(count)
+ }
+ return fmt.Sprint(written)
+}
+
+// Client is what the editor is given to write dates with (dates.mjs):
+// the patterns its chips, the [[ list and the picker use.
+type Client struct {
+ Code string `json:"code"`
+ FirstDay int `json:"firstDay"`
+ Order string `json:"order"`
+ Weekdays []string `json:"weekdays"`
+ Narrow []string `json:"narrow"`
+ Patterns map[string]*pattern `json:"patterns"`
+}
+
+// clientKinds are the patterns the editor draws with.
+var clientKinds = []string{"day", "dayYear", "monthYear"}
+
+// Client is the editor's share of the locale's data.
+func (in *Locale) Client() Client {
+ in = in.orDefault()
+ out := Client{Code: in.code, FirstDay: in.data.FirstDay,
+ Order: in.data.Order, Weekdays: in.data.Weekdays,
+ Narrow: in.data.Narrow, Patterns: map[string]*pattern{}}
+ for _, kind := range clientKinds {
+ out.Patterns[kind] = in.data.Patterns[kind]
+ }
+ return out
+}
diff --git a/internal/fichas/locale/locale_test.go b/internal/fichas/locale/locale_test.go
new file mode 100644
index 0000000..a22ef4c
--- /dev/null
+++ b/internal/fichas/locale/locale_test.go
@@ -0,0 +1,185 @@
+package locale
+
+import (
+ "bytes"
+ "encoding/json"
+ "flag"
+ "os"
+ "strings"
+ "testing"
+ "time"
+)
+
+var update = flag.Bool("update", false, "rewrite testdata/date_labels.json")
+
+const labelsPath = "testdata/date_labels.json"
+
+// labelCase is one moment drawn as one kind in one locale: what Go
+// writes, and what editor/dates.mjs must write too (dates.test.mjs).
+type labelCase struct {
+ Locale string `json:"locale"`
+ Kind string `json:"kind"`
+ At string `json:"at"`
+ Want string `json:"want"`
+}
+
+var labelMoments = []string{"2024-02-29T00:00", "2025-01-01T09:07",
+ "2026-11-17T12:00", "2026-11-22T21:09", "2026-12-31T23:59",
+ "2027-06-06T00:30"}
+
+var labelKinds = []string{"day", "dayYear", "short", "date", "dateYear",
+ "monthYear", "month", "year", "time", "stamp"}
+
+func labelCases(t *testing.T) []labelCase {
+ t.Helper()
+ var out []labelCase
+ for _, code := range Offered() {
+ for _, kind := range labelKinds {
+ for _, text := range labelMoments {
+ at, err := time.Parse("2006-01-02T15:04", text)
+ if err != nil {
+ t.Fatal(err)
+ }
+ out = append(out, labelCase{Locale: code, Kind: kind,
+ At: text, Want: Get(code).Format(kind, at)})
+ }
+ }
+ }
+ return out
+}
+
+// TestDateLabelsAreCurrent is the Go half of the editor's parity on
+// dates: the file dates.test.mjs holds dates.mjs to. make golden
+// rewrites it.
+func TestDateLabelsAreCurrent(t *testing.T) {
+ var encoded bytes.Buffer
+ encoder := json.NewEncoder(&encoded)
+ encoder.SetEscapeHTML(false)
+ encoder.SetIndent("", " ")
+ if err := encoder.Encode(labelCases(t)); err != nil {
+ t.Fatal(err)
+ }
+ if *update {
+ if err := os.WriteFile(labelsPath, encoded.Bytes(),
+ 0o644); err != nil {
+ t.Fatal(err)
+ }
+ return
+ }
+ committed, err := os.ReadFile(labelsPath)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if !bytes.Equal(committed, encoded.Bytes()) {
+ t.Fatalf("%s is stale: run make golden and commit it", labelsPath)
+ }
+}
+
+func TestLocalesWriteTheirOwnFormats(t *testing.T) {
+ at := time.Date(2026, 11, 17, 21, 9, 0, 0, time.UTC)
+ cases := []struct{ code, kind, want string }{
+ {"en-GB", "day", "Tuesday 17 November"},
+ {"en-IE", "dayYear", "Tuesday 17 November 2026"},
+ {"en-US", "day", "Tuesday, November 17"},
+ {"en-US", "time", "9:09 PM"},
+ {"en-IE", "time", "21:09"},
+ {"de", "day", "Dienstag, 17. November"},
+ {"de", "short", "Di., 17. Nov."},
+ {"fr", "monthYear", "novembre 2026"},
+ {"fr", "stamp", "17 novembre 2026 à 21:09"},
+ {"es", "dateYear", "17 de noviembre de 2026"},
+ }
+ for _, each := range cases {
+ if got := Get(each.code).Format(each.kind, at); got != each.want {
+ t.Errorf("%s %s = %q, want %q", each.code, each.kind, got,
+ each.want)
+ }
+ }
+}
+
+func TestWeeksStartWhereTheLocaleStartsThem(t *testing.T) {
+ friday := time.Date(2026, 11, 20, 0, 0, 0, 0, time.UTC)
+ for code, want := range map[string]string{"en-IE": "2026-11-16",
+ "en-US": "2026-11-15", "de": "2026-11-16", "fr": "2026-11-16"} {
+ got := Get(code).WeekStart(friday).Format(time.DateOnly)
+ if got != want {
+ t.Errorf("%s: the week holding %s starts %s, want %s", code,
+ friday.Format(time.DateOnly), got, want)
+ }
+ }
+ heads := func(code string) string {
+ var letters strings.Builder
+ for _, head := range Get(code).Heads() {
+ letters.WriteString(head.Letter)
+ }
+ return letters.String()
+ }
+ for code, want := range map[string]string{"en-IE": "MTWTFSS",
+ "en-US": "SMTWTFS", "de": "MDMDFSS", "fr": "LMMJVSD"} {
+ if got := heads(code); got != want {
+ t.Errorf("%s heads %q, want %q", code, got, want)
+ }
+ }
+}
+
+func TestDayCarriesTheYearOnlyWhenItIsNotThisOne(t *testing.T) {
+ english := Get("en-GB")
+ if got := english.Day("2026-01-01", 2026); got != "Thursday 1 January" {
+ t.Errorf("this year: %q", got)
+ }
+ if got := english.Day("2025-01-01", 2026); got !=
+ "Wednesday, 1 January 2025" {
+ t.Errorf("another year: %q", got)
+ }
+ if got := english.Day("2026-02-30", 2026); got != "" {
+ t.Errorf("no date: %q", got)
+ }
+}
+
+func TestNumbersAreRastrillos(t *testing.T) {
+ // fr and es are rastrillo's, not CLDR 48's: CLDR writes 1\u202f234
+ // in French and 1234 in Spanish (two-digit minimum grouping).
+ // Reported upstream (build note 85); these pin today's output.
+ for code, want := range map[string]string{"en-IE": "1,234",
+ "en-US": "1,234", "de": "1.234", "fr": "1\u00a0234",
+ "es": "1.234"} {
+ if got := Get(code).Number(1234); got != want {
+ t.Errorf("%s writes 1234 as %q, want %q", code, got, want)
+ }
+ }
+}
+
+func TestTheTeamLocaleIsChecked(t *testing.T) {
+ for _, good := range Offered() {
+ if err := Check(good); err != nil {
+ t.Errorf("Check(%q): %v", good, err)
+ }
+ }
+ for _, bad := range []string{"en_IE", "en-ie", "pt-PT", "klingon", ""} {
+ if err := Check(bad); err == nil {
+ t.Errorf("Check(%q) accepted it", bad)
+ }
+ }
+}
+
+func TestNegotiationPutsTheTeamFirst(t *testing.T) {
+ set, err := Negotiation("en-US")
+ if err != nil {
+ t.Fatal(err)
+ }
+ if codes := set.Codes(); codes[0] != "en-US" || len(codes) !=
+ len(Offered()) {
+ t.Errorf("codes %v", codes)
+ }
+ if set.Default() != "en-US" {
+ t.Errorf("default %q", set.Default())
+ }
+}
+
+func TestANilLocaleIsTheDefault(t *testing.T) {
+ var none *Locale
+ if got, want := none.Long("2026-11-17"),
+ Get(Default).Long("2026-11-17"); got != want {
+ t.Errorf("nil writes %q, the default %q", got, want)
+ }
+}
diff --git a/internal/fichas/locale/testdata/date_labels.json b/internal/fichas/locale/testdata/date_labels.json
new file mode 100644
index 0000000..430bd3c
--- /dev/null
+++ b/internal/fichas/locale/testdata/date_labels.json
@@ -0,0 +1,2162 @@
+[
+ {
+ "locale": "en-IE",
+ "kind": "day",
+ "at": "2024-02-29T00:00",
+ "want": "Thursday, 29 February"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "day",
+ "at": "2025-01-01T09:07",
+ "want": "Wednesday, 1 January"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "day",
+ "at": "2026-11-17T12:00",
+ "want": "Tuesday, 17 November"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "day",
+ "at": "2026-11-22T21:09",
+ "want": "Sunday, 22 November"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "day",
+ "at": "2026-12-31T23:59",
+ "want": "Thursday, 31 December"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "day",
+ "at": "2027-06-06T00:30",
+ "want": "Sunday, 6 June"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "dayYear",
+ "at": "2024-02-29T00:00",
+ "want": "Thursday 29 February 2024"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "dayYear",
+ "at": "2025-01-01T09:07",
+ "want": "Wednesday 1 January 2025"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "dayYear",
+ "at": "2026-11-17T12:00",
+ "want": "Tuesday 17 November 2026"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "dayYear",
+ "at": "2026-11-22T21:09",
+ "want": "Sunday 22 November 2026"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "dayYear",
+ "at": "2026-12-31T23:59",
+ "want": "Thursday 31 December 2026"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "dayYear",
+ "at": "2027-06-06T00:30",
+ "want": "Sunday 6 June 2027"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "short",
+ "at": "2024-02-29T00:00",
+ "want": "Thu, 29 Feb"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "short",
+ "at": "2025-01-01T09:07",
+ "want": "Wed, 1 Jan"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "short",
+ "at": "2026-11-17T12:00",
+ "want": "Tue, 17 Nov"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "short",
+ "at": "2026-11-22T21:09",
+ "want": "Sun, 22 Nov"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "short",
+ "at": "2026-12-31T23:59",
+ "want": "Thu, 31 Dec"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "short",
+ "at": "2027-06-06T00:30",
+ "want": "Sun, 6 Jun"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "date",
+ "at": "2024-02-29T00:00",
+ "want": "29 February"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "date",
+ "at": "2025-01-01T09:07",
+ "want": "1 January"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "date",
+ "at": "2026-11-17T12:00",
+ "want": "17 November"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "date",
+ "at": "2026-11-22T21:09",
+ "want": "22 November"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "date",
+ "at": "2026-12-31T23:59",
+ "want": "31 December"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "date",
+ "at": "2027-06-06T00:30",
+ "want": "6 June"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "dateYear",
+ "at": "2024-02-29T00:00",
+ "want": "29 February 2024"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "dateYear",
+ "at": "2025-01-01T09:07",
+ "want": "1 January 2025"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "dateYear",
+ "at": "2026-11-17T12:00",
+ "want": "17 November 2026"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "dateYear",
+ "at": "2026-11-22T21:09",
+ "want": "22 November 2026"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "dateYear",
+ "at": "2026-12-31T23:59",
+ "want": "31 December 2026"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "dateYear",
+ "at": "2027-06-06T00:30",
+ "want": "6 June 2027"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "monthYear",
+ "at": "2024-02-29T00:00",
+ "want": "February 2024"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "monthYear",
+ "at": "2025-01-01T09:07",
+ "want": "January 2025"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "monthYear",
+ "at": "2026-11-17T12:00",
+ "want": "November 2026"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "monthYear",
+ "at": "2026-11-22T21:09",
+ "want": "November 2026"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "monthYear",
+ "at": "2026-12-31T23:59",
+ "want": "December 2026"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "monthYear",
+ "at": "2027-06-06T00:30",
+ "want": "June 2027"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "month",
+ "at": "2024-02-29T00:00",
+ "want": "February"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "month",
+ "at": "2025-01-01T09:07",
+ "want": "January"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "month",
+ "at": "2026-11-17T12:00",
+ "want": "November"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "month",
+ "at": "2026-11-22T21:09",
+ "want": "November"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "month",
+ "at": "2026-12-31T23:59",
+ "want": "December"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "month",
+ "at": "2027-06-06T00:30",
+ "want": "June"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "year",
+ "at": "2024-02-29T00:00",
+ "want": "2024"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "year",
+ "at": "2025-01-01T09:07",
+ "want": "2025"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "year",
+ "at": "2026-11-17T12:00",
+ "want": "2026"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "year",
+ "at": "2026-11-22T21:09",
+ "want": "2026"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "year",
+ "at": "2026-12-31T23:59",
+ "want": "2026"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "year",
+ "at": "2027-06-06T00:30",
+ "want": "2027"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "time",
+ "at": "2024-02-29T00:00",
+ "want": "00:00"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "time",
+ "at": "2025-01-01T09:07",
+ "want": "09:07"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "time",
+ "at": "2026-11-17T12:00",
+ "want": "12:00"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "time",
+ "at": "2026-11-22T21:09",
+ "want": "21:09"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "time",
+ "at": "2026-12-31T23:59",
+ "want": "23:59"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "time",
+ "at": "2027-06-06T00:30",
+ "want": "00:30"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "stamp",
+ "at": "2024-02-29T00:00",
+ "want": "29 February 2024 at 00:00"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "stamp",
+ "at": "2025-01-01T09:07",
+ "want": "1 January 2025 at 09:07"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "stamp",
+ "at": "2026-11-17T12:00",
+ "want": "17 November 2026 at 12:00"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "stamp",
+ "at": "2026-11-22T21:09",
+ "want": "22 November 2026 at 21:09"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "stamp",
+ "at": "2026-12-31T23:59",
+ "want": "31 December 2026 at 23:59"
+ },
+ {
+ "locale": "en-IE",
+ "kind": "stamp",
+ "at": "2027-06-06T00:30",
+ "want": "6 June 2027 at 00:30"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "day",
+ "at": "2024-02-29T00:00",
+ "want": "Thursday 29 February"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "day",
+ "at": "2025-01-01T09:07",
+ "want": "Wednesday 1 January"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "day",
+ "at": "2026-11-17T12:00",
+ "want": "Tuesday 17 November"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "day",
+ "at": "2026-11-22T21:09",
+ "want": "Sunday 22 November"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "day",
+ "at": "2026-12-31T23:59",
+ "want": "Thursday 31 December"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "day",
+ "at": "2027-06-06T00:30",
+ "want": "Sunday 6 June"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "dayYear",
+ "at": "2024-02-29T00:00",
+ "want": "Thursday, 29 February 2024"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "dayYear",
+ "at": "2025-01-01T09:07",
+ "want": "Wednesday, 1 January 2025"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "dayYear",
+ "at": "2026-11-17T12:00",
+ "want": "Tuesday, 17 November 2026"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "dayYear",
+ "at": "2026-11-22T21:09",
+ "want": "Sunday, 22 November 2026"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "dayYear",
+ "at": "2026-12-31T23:59",
+ "want": "Thursday, 31 December 2026"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "dayYear",
+ "at": "2027-06-06T00:30",
+ "want": "Sunday, 6 June 2027"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "short",
+ "at": "2024-02-29T00:00",
+ "want": "Thu 29 Feb"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "short",
+ "at": "2025-01-01T09:07",
+ "want": "Wed 1 Jan"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "short",
+ "at": "2026-11-17T12:00",
+ "want": "Tue 17 Nov"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "short",
+ "at": "2026-11-22T21:09",
+ "want": "Sun 22 Nov"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "short",
+ "at": "2026-12-31T23:59",
+ "want": "Thu 31 Dec"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "short",
+ "at": "2027-06-06T00:30",
+ "want": "Sun 6 Jun"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "date",
+ "at": "2024-02-29T00:00",
+ "want": "29 February"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "date",
+ "at": "2025-01-01T09:07",
+ "want": "1 January"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "date",
+ "at": "2026-11-17T12:00",
+ "want": "17 November"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "date",
+ "at": "2026-11-22T21:09",
+ "want": "22 November"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "date",
+ "at": "2026-12-31T23:59",
+ "want": "31 December"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "date",
+ "at": "2027-06-06T00:30",
+ "want": "6 June"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "dateYear",
+ "at": "2024-02-29T00:00",
+ "want": "29 February 2024"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "dateYear",
+ "at": "2025-01-01T09:07",
+ "want": "1 January 2025"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "dateYear",
+ "at": "2026-11-17T12:00",
+ "want": "17 November 2026"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "dateYear",
+ "at": "2026-11-22T21:09",
+ "want": "22 November 2026"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "dateYear",
+ "at": "2026-12-31T23:59",
+ "want": "31 December 2026"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "dateYear",
+ "at": "2027-06-06T00:30",
+ "want": "6 June 2027"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "monthYear",
+ "at": "2024-02-29T00:00",
+ "want": "February 2024"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "monthYear",
+ "at": "2025-01-01T09:07",
+ "want": "January 2025"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "monthYear",
+ "at": "2026-11-17T12:00",
+ "want": "November 2026"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "monthYear",
+ "at": "2026-11-22T21:09",
+ "want": "November 2026"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "monthYear",
+ "at": "2026-12-31T23:59",
+ "want": "December 2026"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "monthYear",
+ "at": "2027-06-06T00:30",
+ "want": "June 2027"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "month",
+ "at": "2024-02-29T00:00",
+ "want": "February"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "month",
+ "at": "2025-01-01T09:07",
+ "want": "January"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "month",
+ "at": "2026-11-17T12:00",
+ "want": "November"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "month",
+ "at": "2026-11-22T21:09",
+ "want": "November"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "month",
+ "at": "2026-12-31T23:59",
+ "want": "December"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "month",
+ "at": "2027-06-06T00:30",
+ "want": "June"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "year",
+ "at": "2024-02-29T00:00",
+ "want": "2024"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "year",
+ "at": "2025-01-01T09:07",
+ "want": "2025"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "year",
+ "at": "2026-11-17T12:00",
+ "want": "2026"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "year",
+ "at": "2026-11-22T21:09",
+ "want": "2026"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "year",
+ "at": "2026-12-31T23:59",
+ "want": "2026"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "year",
+ "at": "2027-06-06T00:30",
+ "want": "2027"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "time",
+ "at": "2024-02-29T00:00",
+ "want": "00:00"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "time",
+ "at": "2025-01-01T09:07",
+ "want": "09:07"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "time",
+ "at": "2026-11-17T12:00",
+ "want": "12:00"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "time",
+ "at": "2026-11-22T21:09",
+ "want": "21:09"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "time",
+ "at": "2026-12-31T23:59",
+ "want": "23:59"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "time",
+ "at": "2027-06-06T00:30",
+ "want": "00:30"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "stamp",
+ "at": "2024-02-29T00:00",
+ "want": "29 February 2024 at 00:00"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "stamp",
+ "at": "2025-01-01T09:07",
+ "want": "1 January 2025 at 09:07"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "stamp",
+ "at": "2026-11-17T12:00",
+ "want": "17 November 2026 at 12:00"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "stamp",
+ "at": "2026-11-22T21:09",
+ "want": "22 November 2026 at 21:09"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "stamp",
+ "at": "2026-12-31T23:59",
+ "want": "31 December 2026 at 23:59"
+ },
+ {
+ "locale": "en-GB",
+ "kind": "stamp",
+ "at": "2027-06-06T00:30",
+ "want": "6 June 2027 at 00:30"
+ },
+ {
+ "locale": "en-US",
+ "kind": "day",
+ "at": "2024-02-29T00:00",
+ "want": "Thursday, February 29"
+ },
+ {
+ "locale": "en-US",
+ "kind": "day",
+ "at": "2025-01-01T09:07",
+ "want": "Wednesday, January 1"
+ },
+ {
+ "locale": "en-US",
+ "kind": "day",
+ "at": "2026-11-17T12:00",
+ "want": "Tuesday, November 17"
+ },
+ {
+ "locale": "en-US",
+ "kind": "day",
+ "at": "2026-11-22T21:09",
+ "want": "Sunday, November 22"
+ },
+ {
+ "locale": "en-US",
+ "kind": "day",
+ "at": "2026-12-31T23:59",
+ "want": "Thursday, December 31"
+ },
+ {
+ "locale": "en-US",
+ "kind": "day",
+ "at": "2027-06-06T00:30",
+ "want": "Sunday, June 6"
+ },
+ {
+ "locale": "en-US",
+ "kind": "dayYear",
+ "at": "2024-02-29T00:00",
+ "want": "Thursday, February 29, 2024"
+ },
+ {
+ "locale": "en-US",
+ "kind": "dayYear",
+ "at": "2025-01-01T09:07",
+ "want": "Wednesday, January 1, 2025"
+ },
+ {
+ "locale": "en-US",
+ "kind": "dayYear",
+ "at": "2026-11-17T12:00",
+ "want": "Tuesday, November 17, 2026"
+ },
+ {
+ "locale": "en-US",
+ "kind": "dayYear",
+ "at": "2026-11-22T21:09",
+ "want": "Sunday, November 22, 2026"
+ },
+ {
+ "locale": "en-US",
+ "kind": "dayYear",
+ "at": "2026-12-31T23:59",
+ "want": "Thursday, December 31, 2026"
+ },
+ {
+ "locale": "en-US",
+ "kind": "dayYear",
+ "at": "2027-06-06T00:30",
+ "want": "Sunday, June 6, 2027"
+ },
+ {
+ "locale": "en-US",
+ "kind": "short",
+ "at": "2024-02-29T00:00",
+ "want": "Thu, Feb 29"
+ },
+ {
+ "locale": "en-US",
+ "kind": "short",
+ "at": "2025-01-01T09:07",
+ "want": "Wed, Jan 1"
+ },
+ {
+ "locale": "en-US",
+ "kind": "short",
+ "at": "2026-11-17T12:00",
+ "want": "Tue, Nov 17"
+ },
+ {
+ "locale": "en-US",
+ "kind": "short",
+ "at": "2026-11-22T21:09",
+ "want": "Sun, Nov 22"
+ },
+ {
+ "locale": "en-US",
+ "kind": "short",
+ "at": "2026-12-31T23:59",
+ "want": "Thu, Dec 31"
+ },
+ {
+ "locale": "en-US",
+ "kind": "short",
+ "at": "2027-06-06T00:30",
+ "want": "Sun, Jun 6"
+ },
+ {
+ "locale": "en-US",
+ "kind": "date",
+ "at": "2024-02-29T00:00",
+ "want": "February 29"
+ },
+ {
+ "locale": "en-US",
+ "kind": "date",
+ "at": "2025-01-01T09:07",
+ "want": "January 1"
+ },
+ {
+ "locale": "en-US",
+ "kind": "date",
+ "at": "2026-11-17T12:00",
+ "want": "November 17"
+ },
+ {
+ "locale": "en-US",
+ "kind": "date",
+ "at": "2026-11-22T21:09",
+ "want": "November 22"
+ },
+ {
+ "locale": "en-US",
+ "kind": "date",
+ "at": "2026-12-31T23:59",
+ "want": "December 31"
+ },
+ {
+ "locale": "en-US",
+ "kind": "date",
+ "at": "2027-06-06T00:30",
+ "want": "June 6"
+ },
+ {
+ "locale": "en-US",
+ "kind": "dateYear",
+ "at": "2024-02-29T00:00",
+ "want": "February 29, 2024"
+ },
+ {
+ "locale": "en-US",
+ "kind": "dateYear",
+ "at": "2025-01-01T09:07",
+ "want": "January 1, 2025"
+ },
+ {
+ "locale": "en-US",
+ "kind": "dateYear",
+ "at": "2026-11-17T12:00",
+ "want": "November 17, 2026"
+ },
+ {
+ "locale": "en-US",
+ "kind": "dateYear",
+ "at": "2026-11-22T21:09",
+ "want": "November 22, 2026"
+ },
+ {
+ "locale": "en-US",
+ "kind": "dateYear",
+ "at": "2026-12-31T23:59",
+ "want": "December 31, 2026"
+ },
+ {
+ "locale": "en-US",
+ "kind": "dateYear",
+ "at": "2027-06-06T00:30",
+ "want": "June 6, 2027"
+ },
+ {
+ "locale": "en-US",
+ "kind": "monthYear",
+ "at": "2024-02-29T00:00",
+ "want": "February 2024"
+ },
+ {
+ "locale": "en-US",
+ "kind": "monthYear",
+ "at": "2025-01-01T09:07",
+ "want": "January 2025"
+ },
+ {
+ "locale": "en-US",
+ "kind": "monthYear",
+ "at": "2026-11-17T12:00",
+ "want": "November 2026"
+ },
+ {
+ "locale": "en-US",
+ "kind": "monthYear",
+ "at": "2026-11-22T21:09",
+ "want": "November 2026"
+ },
+ {
+ "locale": "en-US",
+ "kind": "monthYear",
+ "at": "2026-12-31T23:59",
+ "want": "December 2026"
+ },
+ {
+ "locale": "en-US",
+ "kind": "monthYear",
+ "at": "2027-06-06T00:30",
+ "want": "June 2027"
+ },
+ {
+ "locale": "en-US",
+ "kind": "month",
+ "at": "2024-02-29T00:00",
+ "want": "February"
+ },
+ {
+ "locale": "en-US",
+ "kind": "month",
+ "at": "2025-01-01T09:07",
+ "want": "January"
+ },
+ {
+ "locale": "en-US",
+ "kind": "month",
+ "at": "2026-11-17T12:00",
+ "want": "November"
+ },
+ {
+ "locale": "en-US",
+ "kind": "month",
+ "at": "2026-11-22T21:09",
+ "want": "November"
+ },
+ {
+ "locale": "en-US",
+ "kind": "month",
+ "at": "2026-12-31T23:59",
+ "want": "December"
+ },
+ {
+ "locale": "en-US",
+ "kind": "month",
+ "at": "2027-06-06T00:30",
+ "want": "June"
+ },
+ {
+ "locale": "en-US",
+ "kind": "year",
+ "at": "2024-02-29T00:00",
+ "want": "2024"
+ },
+ {
+ "locale": "en-US",
+ "kind": "year",
+ "at": "2025-01-01T09:07",
+ "want": "2025"
+ },
+ {
+ "locale": "en-US",
+ "kind": "year",
+ "at": "2026-11-17T12:00",
+ "want": "2026"
+ },
+ {
+ "locale": "en-US",
+ "kind": "year",
+ "at": "2026-11-22T21:09",
+ "want": "2026"
+ },
+ {
+ "locale": "en-US",
+ "kind": "year",
+ "at": "2026-12-31T23:59",
+ "want": "2026"
+ },
+ {
+ "locale": "en-US",
+ "kind": "year",
+ "at": "2027-06-06T00:30",
+ "want": "2027"
+ },
+ {
+ "locale": "en-US",
+ "kind": "time",
+ "at": "2024-02-29T00:00",
+ "want": "12:00 AM"
+ },
+ {
+ "locale": "en-US",
+ "kind": "time",
+ "at": "2025-01-01T09:07",
+ "want": "9:07 AM"
+ },
+ {
+ "locale": "en-US",
+ "kind": "time",
+ "at": "2026-11-17T12:00",
+ "want": "12:00 PM"
+ },
+ {
+ "locale": "en-US",
+ "kind": "time",
+ "at": "2026-11-22T21:09",
+ "want": "9:09 PM"
+ },
+ {
+ "locale": "en-US",
+ "kind": "time",
+ "at": "2026-12-31T23:59",
+ "want": "11:59 PM"
+ },
+ {
+ "locale": "en-US",
+ "kind": "time",
+ "at": "2027-06-06T00:30",
+ "want": "12:30 AM"
+ },
+ {
+ "locale": "en-US",
+ "kind": "stamp",
+ "at": "2024-02-29T00:00",
+ "want": "February 29, 2024 at 12:00 AM"
+ },
+ {
+ "locale": "en-US",
+ "kind": "stamp",
+ "at": "2025-01-01T09:07",
+ "want": "January 1, 2025 at 9:07 AM"
+ },
+ {
+ "locale": "en-US",
+ "kind": "stamp",
+ "at": "2026-11-17T12:00",
+ "want": "November 17, 2026 at 12:00 PM"
+ },
+ {
+ "locale": "en-US",
+ "kind": "stamp",
+ "at": "2026-11-22T21:09",
+ "want": "November 22, 2026 at 9:09 PM"
+ },
+ {
+ "locale": "en-US",
+ "kind": "stamp",
+ "at": "2026-12-31T23:59",
+ "want": "December 31, 2026 at 11:59 PM"
+ },
+ {
+ "locale": "en-US",
+ "kind": "stamp",
+ "at": "2027-06-06T00:30",
+ "want": "June 6, 2027 at 12:30 AM"
+ },
+ {
+ "locale": "de",
+ "kind": "day",
+ "at": "2024-02-29T00:00",
+ "want": "Donnerstag, 29. Februar"
+ },
+ {
+ "locale": "de",
+ "kind": "day",
+ "at": "2025-01-01T09:07",
+ "want": "Mittwoch, 1. Januar"
+ },
+ {
+ "locale": "de",
+ "kind": "day",
+ "at": "2026-11-17T12:00",
+ "want": "Dienstag, 17. November"
+ },
+ {
+ "locale": "de",
+ "kind": "day",
+ "at": "2026-11-22T21:09",
+ "want": "Sonntag, 22. November"
+ },
+ {
+ "locale": "de",
+ "kind": "day",
+ "at": "2026-12-31T23:59",
+ "want": "Donnerstag, 31. Dezember"
+ },
+ {
+ "locale": "de",
+ "kind": "day",
+ "at": "2027-06-06T00:30",
+ "want": "Sonntag, 6. Juni"
+ },
+ {
+ "locale": "de",
+ "kind": "dayYear",
+ "at": "2024-02-29T00:00",
+ "want": "Donnerstag, 29. Februar 2024"
+ },
+ {
+ "locale": "de",
+ "kind": "dayYear",
+ "at": "2025-01-01T09:07",
+ "want": "Mittwoch, 1. Januar 2025"
+ },
+ {
+ "locale": "de",
+ "kind": "dayYear",
+ "at": "2026-11-17T12:00",
+ "want": "Dienstag, 17. November 2026"
+ },
+ {
+ "locale": "de",
+ "kind": "dayYear",
+ "at": "2026-11-22T21:09",
+ "want": "Sonntag, 22. November 2026"
+ },
+ {
+ "locale": "de",
+ "kind": "dayYear",
+ "at": "2026-12-31T23:59",
+ "want": "Donnerstag, 31. Dezember 2026"
+ },
+ {
+ "locale": "de",
+ "kind": "dayYear",
+ "at": "2027-06-06T00:30",
+ "want": "Sonntag, 6. Juni 2027"
+ },
+ {
+ "locale": "de",
+ "kind": "short",
+ "at": "2024-02-29T00:00",
+ "want": "Do., 29. Feb."
+ },
+ {
+ "locale": "de",
+ "kind": "short",
+ "at": "2025-01-01T09:07",
+ "want": "Mi., 1. Jan."
+ },
+ {
+ "locale": "de",
+ "kind": "short",
+ "at": "2026-11-17T12:00",
+ "want": "Di., 17. Nov."
+ },
+ {
+ "locale": "de",
+ "kind": "short",
+ "at": "2026-11-22T21:09",
+ "want": "So., 22. Nov."
+ },
+ {
+ "locale": "de",
+ "kind": "short",
+ "at": "2026-12-31T23:59",
+ "want": "Do., 31. Dez."
+ },
+ {
+ "locale": "de",
+ "kind": "short",
+ "at": "2027-06-06T00:30",
+ "want": "So., 6. Juni"
+ },
+ {
+ "locale": "de",
+ "kind": "date",
+ "at": "2024-02-29T00:00",
+ "want": "29. Februar"
+ },
+ {
+ "locale": "de",
+ "kind": "date",
+ "at": "2025-01-01T09:07",
+ "want": "1. Januar"
+ },
+ {
+ "locale": "de",
+ "kind": "date",
+ "at": "2026-11-17T12:00",
+ "want": "17. November"
+ },
+ {
+ "locale": "de",
+ "kind": "date",
+ "at": "2026-11-22T21:09",
+ "want": "22. November"
+ },
+ {
+ "locale": "de",
+ "kind": "date",
+ "at": "2026-12-31T23:59",
+ "want": "31. Dezember"
+ },
+ {
+ "locale": "de",
+ "kind": "date",
+ "at": "2027-06-06T00:30",
+ "want": "6. Juni"
+ },
+ {
+ "locale": "de",
+ "kind": "dateYear",
+ "at": "2024-02-29T00:00",
+ "want": "29. Februar 2024"
+ },
+ {
+ "locale": "de",
+ "kind": "dateYear",
+ "at": "2025-01-01T09:07",
+ "want": "1. Januar 2025"
+ },
+ {
+ "locale": "de",
+ "kind": "dateYear",
+ "at": "2026-11-17T12:00",
+ "want": "17. November 2026"
+ },
+ {
+ "locale": "de",
+ "kind": "dateYear",
+ "at": "2026-11-22T21:09",
+ "want": "22. November 2026"
+ },
+ {
+ "locale": "de",
+ "kind": "dateYear",
+ "at": "2026-12-31T23:59",
+ "want": "31. Dezember 2026"
+ },
+ {
+ "locale": "de",
+ "kind": "dateYear",
+ "at": "2027-06-06T00:30",
+ "want": "6. Juni 2027"
+ },
+ {
+ "locale": "de",
+ "kind": "monthYear",
+ "at": "2024-02-29T00:00",
+ "want": "Februar 2024"
+ },
+ {
+ "locale": "de",
+ "kind": "monthYear",
+ "at": "2025-01-01T09:07",
+ "want": "Januar 2025"
+ },
+ {
+ "locale": "de",
+ "kind": "monthYear",
+ "at": "2026-11-17T12:00",
+ "want": "November 2026"
+ },
+ {
+ "locale": "de",
+ "kind": "monthYear",
+ "at": "2026-11-22T21:09",
+ "want": "November 2026"
+ },
+ {
+ "locale": "de",
+ "kind": "monthYear",
+ "at": "2026-12-31T23:59",
+ "want": "Dezember 2026"
+ },
+ {
+ "locale": "de",
+ "kind": "monthYear",
+ "at": "2027-06-06T00:30",
+ "want": "Juni 2027"
+ },
+ {
+ "locale": "de",
+ "kind": "month",
+ "at": "2024-02-29T00:00",
+ "want": "Februar"
+ },
+ {
+ "locale": "de",
+ "kind": "month",
+ "at": "2025-01-01T09:07",
+ "want": "Januar"
+ },
+ {
+ "locale": "de",
+ "kind": "month",
+ "at": "2026-11-17T12:00",
+ "want": "November"
+ },
+ {
+ "locale": "de",
+ "kind": "month",
+ "at": "2026-11-22T21:09",
+ "want": "November"
+ },
+ {
+ "locale": "de",
+ "kind": "month",
+ "at": "2026-12-31T23:59",
+ "want": "Dezember"
+ },
+ {
+ "locale": "de",
+ "kind": "month",
+ "at": "2027-06-06T00:30",
+ "want": "Juni"
+ },
+ {
+ "locale": "de",
+ "kind": "year",
+ "at": "2024-02-29T00:00",
+ "want": "2024"
+ },
+ {
+ "locale": "de",
+ "kind": "year",
+ "at": "2025-01-01T09:07",
+ "want": "2025"
+ },
+ {
+ "locale": "de",
+ "kind": "year",
+ "at": "2026-11-17T12:00",
+ "want": "2026"
+ },
+ {
+ "locale": "de",
+ "kind": "year",
+ "at": "2026-11-22T21:09",
+ "want": "2026"
+ },
+ {
+ "locale": "de",
+ "kind": "year",
+ "at": "2026-12-31T23:59",
+ "want": "2026"
+ },
+ {
+ "locale": "de",
+ "kind": "year",
+ "at": "2027-06-06T00:30",
+ "want": "2027"
+ },
+ {
+ "locale": "de",
+ "kind": "time",
+ "at": "2024-02-29T00:00",
+ "want": "00:00"
+ },
+ {
+ "locale": "de",
+ "kind": "time",
+ "at": "2025-01-01T09:07",
+ "want": "09:07"
+ },
+ {
+ "locale": "de",
+ "kind": "time",
+ "at": "2026-11-17T12:00",
+ "want": "12:00"
+ },
+ {
+ "locale": "de",
+ "kind": "time",
+ "at": "2026-11-22T21:09",
+ "want": "21:09"
+ },
+ {
+ "locale": "de",
+ "kind": "time",
+ "at": "2026-12-31T23:59",
+ "want": "23:59"
+ },
+ {
+ "locale": "de",
+ "kind": "time",
+ "at": "2027-06-06T00:30",
+ "want": "00:30"
+ },
+ {
+ "locale": "de",
+ "kind": "stamp",
+ "at": "2024-02-29T00:00",
+ "want": "29. Februar 2024 um 00:00"
+ },
+ {
+ "locale": "de",
+ "kind": "stamp",
+ "at": "2025-01-01T09:07",
+ "want": "1. Januar 2025 um 09:07"
+ },
+ {
+ "locale": "de",
+ "kind": "stamp",
+ "at": "2026-11-17T12:00",
+ "want": "17. November 2026 um 12:00"
+ },
+ {
+ "locale": "de",
+ "kind": "stamp",
+ "at": "2026-11-22T21:09",
+ "want": "22. November 2026 um 21:09"
+ },
+ {
+ "locale": "de",
+ "kind": "stamp",
+ "at": "2026-12-31T23:59",
+ "want": "31. Dezember 2026 um 23:59"
+ },
+ {
+ "locale": "de",
+ "kind": "stamp",
+ "at": "2027-06-06T00:30",
+ "want": "6. Juni 2027 um 00:30"
+ },
+ {
+ "locale": "fr",
+ "kind": "day",
+ "at": "2024-02-29T00:00",
+ "want": "jeudi 29 février"
+ },
+ {
+ "locale": "fr",
+ "kind": "day",
+ "at": "2025-01-01T09:07",
+ "want": "mercredi 1 janvier"
+ },
+ {
+ "locale": "fr",
+ "kind": "day",
+ "at": "2026-11-17T12:00",
+ "want": "mardi 17 novembre"
+ },
+ {
+ "locale": "fr",
+ "kind": "day",
+ "at": "2026-11-22T21:09",
+ "want": "dimanche 22 novembre"
+ },
+ {
+ "locale": "fr",
+ "kind": "day",
+ "at": "2026-12-31T23:59",
+ "want": "jeudi 31 décembre"
+ },
+ {
+ "locale": "fr",
+ "kind": "day",
+ "at": "2027-06-06T00:30",
+ "want": "dimanche 6 juin"
+ },
+ {
+ "locale": "fr",
+ "kind": "dayYear",
+ "at": "2024-02-29T00:00",
+ "want": "jeudi 29 février 2024"
+ },
+ {
+ "locale": "fr",
+ "kind": "dayYear",
+ "at": "2025-01-01T09:07",
+ "want": "mercredi 1 janvier 2025"
+ },
+ {
+ "locale": "fr",
+ "kind": "dayYear",
+ "at": "2026-11-17T12:00",
+ "want": "mardi 17 novembre 2026"
+ },
+ {
+ "locale": "fr",
+ "kind": "dayYear",
+ "at": "2026-11-22T21:09",
+ "want": "dimanche 22 novembre 2026"
+ },
+ {
+ "locale": "fr",
+ "kind": "dayYear",
+ "at": "2026-12-31T23:59",
+ "want": "jeudi 31 décembre 2026"
+ },
+ {
+ "locale": "fr",
+ "kind": "dayYear",
+ "at": "2027-06-06T00:30",
+ "want": "dimanche 6 juin 2027"
+ },
+ {
+ "locale": "fr",
+ "kind": "short",
+ "at": "2024-02-29T00:00",
+ "want": "jeu. 29 févr."
+ },
+ {
+ "locale": "fr",
+ "kind": "short",
+ "at": "2025-01-01T09:07",
+ "want": "mer. 1 janv."
+ },
+ {
+ "locale": "fr",
+ "kind": "short",
+ "at": "2026-11-17T12:00",
+ "want": "mar. 17 nov."
+ },
+ {
+ "locale": "fr",
+ "kind": "short",
+ "at": "2026-11-22T21:09",
+ "want": "dim. 22 nov."
+ },
+ {
+ "locale": "fr",
+ "kind": "short",
+ "at": "2026-12-31T23:59",
+ "want": "jeu. 31 déc."
+ },
+ {
+ "locale": "fr",
+ "kind": "short",
+ "at": "2027-06-06T00:30",
+ "want": "dim. 6 juin"
+ },
+ {
+ "locale": "fr",
+ "kind": "date",
+ "at": "2024-02-29T00:00",
+ "want": "29 février"
+ },
+ {
+ "locale": "fr",
+ "kind": "date",
+ "at": "2025-01-01T09:07",
+ "want": "1 janvier"
+ },
+ {
+ "locale": "fr",
+ "kind": "date",
+ "at": "2026-11-17T12:00",
+ "want": "17 novembre"
+ },
+ {
+ "locale": "fr",
+ "kind": "date",
+ "at": "2026-11-22T21:09",
+ "want": "22 novembre"
+ },
+ {
+ "locale": "fr",
+ "kind": "date",
+ "at": "2026-12-31T23:59",
+ "want": "31 décembre"
+ },
+ {
+ "locale": "fr",
+ "kind": "date",
+ "at": "2027-06-06T00:30",
+ "want": "6 juin"
+ },
+ {
+ "locale": "fr",
+ "kind": "dateYear",
+ "at": "2024-02-29T00:00",
+ "want": "29 février 2024"
+ },
+ {
+ "locale": "fr",
+ "kind": "dateYear",
+ "at": "2025-01-01T09:07",
+ "want": "1 janvier 2025"
+ },
+ {
+ "locale": "fr",
+ "kind": "dateYear",
+ "at": "2026-11-17T12:00",
+ "want": "17 novembre 2026"
+ },
+ {
+ "locale": "fr",
+ "kind": "dateYear",
+ "at": "2026-11-22T21:09",
+ "want": "22 novembre 2026"
+ },
+ {
+ "locale": "fr",
+ "kind": "dateYear",
+ "at": "2026-12-31T23:59",
+ "want": "31 décembre 2026"
+ },
+ {
+ "locale": "fr",
+ "kind": "dateYear",
+ "at": "2027-06-06T00:30",
+ "want": "6 juin 2027"
+ },
+ {
+ "locale": "fr",
+ "kind": "monthYear",
+ "at": "2024-02-29T00:00",
+ "want": "février 2024"
+ },
+ {
+ "locale": "fr",
+ "kind": "monthYear",
+ "at": "2025-01-01T09:07",
+ "want": "janvier 2025"
+ },
+ {
+ "locale": "fr",
+ "kind": "monthYear",
+ "at": "2026-11-17T12:00",
+ "want": "novembre 2026"
+ },
+ {
+ "locale": "fr",
+ "kind": "monthYear",
+ "at": "2026-11-22T21:09",
+ "want": "novembre 2026"
+ },
+ {
+ "locale": "fr",
+ "kind": "monthYear",
+ "at": "2026-12-31T23:59",
+ "want": "décembre 2026"
+ },
+ {
+ "locale": "fr",
+ "kind": "monthYear",
+ "at": "2027-06-06T00:30",
+ "want": "juin 2027"
+ },
+ {
+ "locale": "fr",
+ "kind": "month",
+ "at": "2024-02-29T00:00",
+ "want": "février"
+ },
+ {
+ "locale": "fr",
+ "kind": "month",
+ "at": "2025-01-01T09:07",
+ "want": "janvier"
+ },
+ {
+ "locale": "fr",
+ "kind": "month",
+ "at": "2026-11-17T12:00",
+ "want": "novembre"
+ },
+ {
+ "locale": "fr",
+ "kind": "month",
+ "at": "2026-11-22T21:09",
+ "want": "novembre"
+ },
+ {
+ "locale": "fr",
+ "kind": "month",
+ "at": "2026-12-31T23:59",
+ "want": "décembre"
+ },
+ {
+ "locale": "fr",
+ "kind": "month",
+ "at": "2027-06-06T00:30",
+ "want": "juin"
+ },
+ {
+ "locale": "fr",
+ "kind": "year",
+ "at": "2024-02-29T00:00",
+ "want": "2024"
+ },
+ {
+ "locale": "fr",
+ "kind": "year",
+ "at": "2025-01-01T09:07",
+ "want": "2025"
+ },
+ {
+ "locale": "fr",
+ "kind": "year",
+ "at": "2026-11-17T12:00",
+ "want": "2026"
+ },
+ {
+ "locale": "fr",
+ "kind": "year",
+ "at": "2026-11-22T21:09",
+ "want": "2026"
+ },
+ {
+ "locale": "fr",
+ "kind": "year",
+ "at": "2026-12-31T23:59",
+ "want": "2026"
+ },
+ {
+ "locale": "fr",
+ "kind": "year",
+ "at": "2027-06-06T00:30",
+ "want": "2027"
+ },
+ {
+ "locale": "fr",
+ "kind": "time",
+ "at": "2024-02-29T00:00",
+ "want": "00:00"
+ },
+ {
+ "locale": "fr",
+ "kind": "time",
+ "at": "2025-01-01T09:07",
+ "want": "09:07"
+ },
+ {
+ "locale": "fr",
+ "kind": "time",
+ "at": "2026-11-17T12:00",
+ "want": "12:00"
+ },
+ {
+ "locale": "fr",
+ "kind": "time",
+ "at": "2026-11-22T21:09",
+ "want": "21:09"
+ },
+ {
+ "locale": "fr",
+ "kind": "time",
+ "at": "2026-12-31T23:59",
+ "want": "23:59"
+ },
+ {
+ "locale": "fr",
+ "kind": "time",
+ "at": "2027-06-06T00:30",
+ "want": "00:30"
+ },
+ {
+ "locale": "fr",
+ "kind": "stamp",
+ "at": "2024-02-29T00:00",
+ "want": "29 février 2024 à 00:00"
+ },
+ {
+ "locale": "fr",
+ "kind": "stamp",
+ "at": "2025-01-01T09:07",
+ "want": "1 janvier 2025 à 09:07"
+ },
+ {
+ "locale": "fr",
+ "kind": "stamp",
+ "at": "2026-11-17T12:00",
+ "want": "17 novembre 2026 à 12:00"
+ },
+ {
+ "locale": "fr",
+ "kind": "stamp",
+ "at": "2026-11-22T21:09",
+ "want": "22 novembre 2026 à 21:09"
+ },
+ {
+ "locale": "fr",
+ "kind": "stamp",
+ "at": "2026-12-31T23:59",
+ "want": "31 décembre 2026 à 23:59"
+ },
+ {
+ "locale": "fr",
+ "kind": "stamp",
+ "at": "2027-06-06T00:30",
+ "want": "6 juin 2027 à 00:30"
+ },
+ {
+ "locale": "es",
+ "kind": "day",
+ "at": "2024-02-29T00:00",
+ "want": "jueves, 29 de febrero"
+ },
+ {
+ "locale": "es",
+ "kind": "day",
+ "at": "2025-01-01T09:07",
+ "want": "miércoles, 1 de enero"
+ },
+ {
+ "locale": "es",
+ "kind": "day",
+ "at": "2026-11-17T12:00",
+ "want": "martes, 17 de noviembre"
+ },
+ {
+ "locale": "es",
+ "kind": "day",
+ "at": "2026-11-22T21:09",
+ "want": "domingo, 22 de noviembre"
+ },
+ {
+ "locale": "es",
+ "kind": "day",
+ "at": "2026-12-31T23:59",
+ "want": "jueves, 31 de diciembre"
+ },
+ {
+ "locale": "es",
+ "kind": "day",
+ "at": "2027-06-06T00:30",
+ "want": "domingo, 6 de junio"
+ },
+ {
+ "locale": "es",
+ "kind": "dayYear",
+ "at": "2024-02-29T00:00",
+ "want": "jueves, 29 de febrero de 2024"
+ },
+ {
+ "locale": "es",
+ "kind": "dayYear",
+ "at": "2025-01-01T09:07",
+ "want": "miércoles, 1 de enero de 2025"
+ },
+ {
+ "locale": "es",
+ "kind": "dayYear",
+ "at": "2026-11-17T12:00",
+ "want": "martes, 17 de noviembre de 2026"
+ },
+ {
+ "locale": "es",
+ "kind": "dayYear",
+ "at": "2026-11-22T21:09",
+ "want": "domingo, 22 de noviembre de 2026"
+ },
+ {
+ "locale": "es",
+ "kind": "dayYear",
+ "at": "2026-12-31T23:59",
+ "want": "jueves, 31 de diciembre de 2026"
+ },
+ {
+ "locale": "es",
+ "kind": "dayYear",
+ "at": "2027-06-06T00:30",
+ "want": "domingo, 6 de junio de 2027"
+ },
+ {
+ "locale": "es",
+ "kind": "short",
+ "at": "2024-02-29T00:00",
+ "want": "jue, 29 feb"
+ },
+ {
+ "locale": "es",
+ "kind": "short",
+ "at": "2025-01-01T09:07",
+ "want": "mié, 1 ene"
+ },
+ {
+ "locale": "es",
+ "kind": "short",
+ "at": "2026-11-17T12:00",
+ "want": "mar, 17 nov"
+ },
+ {
+ "locale": "es",
+ "kind": "short",
+ "at": "2026-11-22T21:09",
+ "want": "dom, 22 nov"
+ },
+ {
+ "locale": "es",
+ "kind": "short",
+ "at": "2026-12-31T23:59",
+ "want": "jue, 31 dic"
+ },
+ {
+ "locale": "es",
+ "kind": "short",
+ "at": "2027-06-06T00:30",
+ "want": "dom, 6 jun"
+ },
+ {
+ "locale": "es",
+ "kind": "date",
+ "at": "2024-02-29T00:00",
+ "want": "29 de febrero"
+ },
+ {
+ "locale": "es",
+ "kind": "date",
+ "at": "2025-01-01T09:07",
+ "want": "1 de enero"
+ },
+ {
+ "locale": "es",
+ "kind": "date",
+ "at": "2026-11-17T12:00",
+ "want": "17 de noviembre"
+ },
+ {
+ "locale": "es",
+ "kind": "date",
+ "at": "2026-11-22T21:09",
+ "want": "22 de noviembre"
+ },
+ {
+ "locale": "es",
+ "kind": "date",
+ "at": "2026-12-31T23:59",
+ "want": "31 de diciembre"
+ },
+ {
+ "locale": "es",
+ "kind": "date",
+ "at": "2027-06-06T00:30",
+ "want": "6 de junio"
+ },
+ {
+ "locale": "es",
+ "kind": "dateYear",
+ "at": "2024-02-29T00:00",
+ "want": "29 de febrero de 2024"
+ },
+ {
+ "locale": "es",
+ "kind": "dateYear",
+ "at": "2025-01-01T09:07",
+ "want": "1 de enero de 2025"
+ },
+ {
+ "locale": "es",
+ "kind": "dateYear",
+ "at": "2026-11-17T12:00",
+ "want": "17 de noviembre de 2026"
+ },
+ {
+ "locale": "es",
+ "kind": "dateYear",
+ "at": "2026-11-22T21:09",
+ "want": "22 de noviembre de 2026"
+ },
+ {
+ "locale": "es",
+ "kind": "dateYear",
+ "at": "2026-12-31T23:59",
+ "want": "31 de diciembre de 2026"
+ },
+ {
+ "locale": "es",
+ "kind": "dateYear",
+ "at": "2027-06-06T00:30",
+ "want": "6 de junio de 2027"
+ },
+ {
+ "locale": "es",
+ "kind": "monthYear",
+ "at": "2024-02-29T00:00",
+ "want": "febrero de 2024"
+ },
+ {
+ "locale": "es",
+ "kind": "monthYear",
+ "at": "2025-01-01T09:07",
+ "want": "enero de 2025"
+ },
+ {
+ "locale": "es",
+ "kind": "monthYear",
+ "at": "2026-11-17T12:00",
+ "want": "noviembre de 2026"
+ },
+ {
+ "locale": "es",
+ "kind": "monthYear",
+ "at": "2026-11-22T21:09",
+ "want": "noviembre de 2026"
+ },
+ {
+ "locale": "es",
+ "kind": "monthYear",
+ "at": "2026-12-31T23:59",
+ "want": "diciembre de 2026"
+ },
+ {
+ "locale": "es",
+ "kind": "monthYear",
+ "at": "2027-06-06T00:30",
+ "want": "junio de 2027"
+ },
+ {
+ "locale": "es",
+ "kind": "month",
+ "at": "2024-02-29T00:00",
+ "want": "febrero"
+ },
+ {
+ "locale": "es",
+ "kind": "month",
+ "at": "2025-01-01T09:07",
+ "want": "enero"
+ },
+ {
+ "locale": "es",
+ "kind": "month",
+ "at": "2026-11-17T12:00",
+ "want": "noviembre"
+ },
+ {
+ "locale": "es",
+ "kind": "month",
+ "at": "2026-11-22T21:09",
+ "want": "noviembre"
+ },
+ {
+ "locale": "es",
+ "kind": "month",
+ "at": "2026-12-31T23:59",
+ "want": "diciembre"
+ },
+ {
+ "locale": "es",
+ "kind": "month",
+ "at": "2027-06-06T00:30",
+ "want": "junio"
+ },
+ {
+ "locale": "es",
+ "kind": "year",
+ "at": "2024-02-29T00:00",
+ "want": "2024"
+ },
+ {
+ "locale": "es",
+ "kind": "year",
+ "at": "2025-01-01T09:07",
+ "want": "2025"
+ },
+ {
+ "locale": "es",
+ "kind": "year",
+ "at": "2026-11-17T12:00",
+ "want": "2026"
+ },
+ {
+ "locale": "es",
+ "kind": "year",
+ "at": "2026-11-22T21:09",
+ "want": "2026"
+ },
+ {
+ "locale": "es",
+ "kind": "year",
+ "at": "2026-12-31T23:59",
+ "want": "2026"
+ },
+ {
+ "locale": "es",
+ "kind": "year",
+ "at": "2027-06-06T00:30",
+ "want": "2027"
+ },
+ {
+ "locale": "es",
+ "kind": "time",
+ "at": "2024-02-29T00:00",
+ "want": "0:00"
+ },
+ {
+ "locale": "es",
+ "kind": "time",
+ "at": "2025-01-01T09:07",
+ "want": "9:07"
+ },
+ {
+ "locale": "es",
+ "kind": "time",
+ "at": "2026-11-17T12:00",
+ "want": "12:00"
+ },
+ {
+ "locale": "es",
+ "kind": "time",
+ "at": "2026-11-22T21:09",
+ "want": "21:09"
+ },
+ {
+ "locale": "es",
+ "kind": "time",
+ "at": "2026-12-31T23:59",
+ "want": "23:59"
+ },
+ {
+ "locale": "es",
+ "kind": "time",
+ "at": "2027-06-06T00:30",
+ "want": "0:30"
+ },
+ {
+ "locale": "es",
+ "kind": "stamp",
+ "at": "2024-02-29T00:00",
+ "want": "29 de febrero de 2024 a las 0:00"
+ },
+ {
+ "locale": "es",
+ "kind": "stamp",
+ "at": "2025-01-01T09:07",
+ "want": "1 de enero de 2025 a las 9:07"
+ },
+ {
+ "locale": "es",
+ "kind": "stamp",
+ "at": "2026-11-17T12:00",
+ "want": "17 de noviembre de 2026 a las 12:00"
+ },
+ {
+ "locale": "es",
+ "kind": "stamp",
+ "at": "2026-11-22T21:09",
+ "want": "22 de noviembre de 2026 a las 21:09"
+ },
+ {
+ "locale": "es",
+ "kind": "stamp",
+ "at": "2026-12-31T23:59",
+ "want": "31 de diciembre de 2026 a las 23:59"
+ },
+ {
+ "locale": "es",
+ "kind": "stamp",
+ "at": "2027-06-06T00:30",
+ "want": "6 de junio de 2027 a las 0:30"
+ }
+]
diff --git a/internal/fichas/pane.go b/internal/fichas/pane.go
index 9992b05..3d90f9d 100644
--- a/internal/fichas/pane.go
+++ b/internal/fichas/pane.go
@@ -6,8 +6,8 @@ package fichas
import (
"net/http"
- "strings"
"strconv"
+ "strings"
"time"
)
diff --git a/internal/fichas/render.go b/internal/fichas/render.go
index 365d10d..35bcb09 100644
--- a/internal/fichas/render.go
+++ b/internal/fichas/render.go
@@ -1,9 +1,9 @@
package fichas
import (
+ "amadan.net/oficina/fichas/internal/fichas/locale"
"bytes"
"embed"
- "fmt"
"html/template"
"log/slog"
"net/http"
@@ -15,11 +15,6 @@ import (
"amadan.net/rastrillo/rastrillo"
"amadan.net/rastrillo/rastrillo/ui"
- // Every pack: Fichas speaks English, but writes numbers and dates in
- // each reader's own format (level-up §6.8), so any reader's locale
- // must be linked. 420 KB on a 28 MB binary, measured at b791bdd.
- _ "amadan.net/rastrillo/rastrillo/locales/modern"
-
"amadan.net/oficina/fichas/internal/fichas/icons"
)
@@ -56,6 +51,8 @@ func init() {
"options": selectOptions,
"ago": ago,
"dateAgo": dateAgo,
+ "stamp": stamp,
+ "longDate": longDate,
"stageTone": stageTone,
"isLong": isLong,
"lower": lower,
@@ -156,17 +153,34 @@ func selectOptions(values []string, current string) []map[string]any {
}
// ago is a past moment in words, for a <time> whose title carries the
-// absolute date (AGENTS.md: dates relative, absolute in a title).
-func ago(when time.Time) string { return relative(time.Now(), when) }
+// absolute date (AGENTS.md: dates relative, absolute in a title). The
+// words are English; past two weeks it is the date, as the reader's
+// locale writes it (§6.8, Mapa's relative).
+func ago(L *ui.Localizer, when time.Time) string { return relative(datesOf(L), time.Now(), when) }
+
+// stamp is a moment in full, for a title: "12 November 2026 at 21:09"
+// in the reader's locale.
+func stamp(L *ui.Localizer, when time.Time) string { return datesOf(L).Stamp(when) }
+
+// longDate is a stored date in full, year and all, as the reader's
+// locale writes it; anything that is no date is shown as it is.
+func longDate(L *ui.Localizer, v string) string {
+ d, err := time.Parse(time.DateOnly, v)
+ if err != nil || len(v) != len(time.DateOnly) {
+ return v
+ }
+ return datesOf(L).Format("dateYear", d)
+}
// dateAgo is ago for a stored date value ("2026-10-02"), which can be in
// the future — a next action usually is. Anything that does not parse is
// returned unchanged rather than hidden.
-func dateAgo(v string) string {
+func dateAgo(L *ui.Localizer, v string) string {
d, err := time.ParseInLocation("2006-01-02", v, time.Local)
if err != nil {
return v
}
+ dates := datesOf(L)
now := time.Now()
today := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.Local)
days := int(d.Sub(today).Hours() / 24)
@@ -178,37 +192,36 @@ func dateAgo(v string) string {
case days == -1:
return "yesterday"
case days > 1 && days < 14:
- return fmt.Sprintf("in %d days", days)
+ return "in " + dates.Number(days) + " days"
case days < -1 && days > -14:
- return fmt.Sprintf("%d days ago", -days)
+ return dates.Number(-days) + " days ago"
+ case d.Year() == now.Year():
+ return dates.Format("date", d)
default:
- return d.Format("2 January 2006")
+ return dates.Format("dateYear", d)
}
}
-func relative(now, when time.Time) string {
+func relative(dates *locale.Locale, now, when time.Time) string {
d := now.Sub(when)
switch {
case d < time.Minute:
return "just now"
case d < time.Hour:
- return plural(int(d.Minutes()), "minute") + " ago"
+ return plural(dates, int(d.Minutes()), "minute") + " ago"
case d < 24*time.Hour:
- return plural(int(d.Hours()), "hour") + " ago"
+ return plural(dates, int(d.Hours()), "hour") + " ago"
case d < 14*24*time.Hour:
- return plural(int(d.Hours()/24), "day") + " ago"
- case d < 60*24*time.Hour:
- return plural(int(d.Hours()/24/7), "week") + " ago"
- default:
- return when.Format("2 January 2006")
+ return plural(dates, int(d.Hours()/24), "day") + " ago"
}
+ return dates.Format("dateYear", when)
}
-func plural(n int, unit string) string {
+func plural(dates *locale.Locale, n int, unit string) string {
if n == 1 {
return "1 " + unit
}
- return fmt.Sprintf("%d %ss", n, unit)
+ return dates.Number(n) + " " + unit + "s"
}
// stageTone maps the seeded Stage values to status-pill tones. The
diff --git a/internal/fichas/schema.go b/internal/fichas/schema.go
index 18f35b9..58d028a 100644
--- a/internal/fichas/schema.go
+++ b/internal/fichas/schema.go
@@ -36,10 +36,11 @@ const (
ObjectField = "field"
// Object kinds later phases write (level-up §9), named now so the
// index's feed knows each before anything writes it.
- ObjectView = "view"
- ObjectFile = "file"
- ObjectDraft = "draft"
- ObjectGroup = "group"
+ ObjectView = "view"
+ ObjectFile = "file"
+ ObjectDraft = "draft"
+ ObjectGroup = "group"
+ ObjectMember = "member"
)
// Limits, stated so a form can say them.
diff --git a/internal/fichas/sync_kinds_test.go b/internal/fichas/sync_kinds_test.go
index e4bf806..fd634cb 100644
--- a/internal/fichas/sync_kinds_test.go
+++ b/internal/fichas/sync_kinds_test.go
@@ -29,7 +29,7 @@ func TestEveryObjectKindIsNamedInSync(t *testing.T) {
if err := UpdateField(ctx(), g, s, fd.Key, Person(1), "Budget (EUR)", nil); err != nil {
t.Fatal(err)
}
- for _, kind := range []string{ObjectView, ObjectFile, ObjectDraft, ObjectGroup} {
+ for _, kind := range []string{ObjectView, ObjectFile, ObjectDraft, ObjectGroup, ObjectMember} {
if err := g.Create(&Event{Kind: EventUpdated, ObjectKind: kind, ObjectID: ct.ID, ChangedFields: "[]", Nonce: 1}).Error; err != nil {
t.Fatal(err)
}
diff --git a/internal/fichas/templates/card_layout.html b/internal/fichas/templates/card_layout.html
index 26a1fe9..1794277 100644
--- a/internal/fichas/templates/card_layout.html
+++ b/internal/fichas/templates/card_layout.html
@@ -23,7 +23,7 @@
<h2 fichas-card-title><span>{{.Title}}</span>{{with $face.Pill}}{{template "status-pill" (dict "Label" . "Tone" (stageTone .))}}{{end}}</h2>
{{range $face.Lines}}
{{if eq .Kind "call"}}<p fichas-card-quote>{{.Value}}</p>
- {{else if eq .Kind "date"}}<p fichas-meta>{{.Label}} <time datetime="{{.Date}}" title="{{.Date}}">{{dateAgo .Date}}</time></p>
+ {{else if eq .Kind "date"}}<p fichas-meta>{{.Label}} <time datetime="{{.Date}}" title="{{longDate $.L .Date}}">{{dateAgo $.L .Date}}</time></p>
{{else if eq .Kind "longtext"}}<p fichas-meta fichas-clamp>{{.Value}}</p>
{{else if eq .Kind "url"}}<p fichas-meta>{{displayURL .Value}}</p>
{{else}}<p fichas-meta>{{.Value}}</p>{{end}}
diff --git a/internal/fichas/templates/history.html b/internal/fichas/templates/history.html
index 53d6e61..f2f10db 100644
--- a/internal/fichas/templates/history.html
+++ b/internal/fichas/templates/history.html
@@ -16,7 +16,7 @@
{{else if .Undo}}undid an earlier change
{{else if .Redo}}redid a change
{{else}}changed {{range $i, $f := .Fields}}{{if $i}}, {{end}}{{$f.Label}}{{end}}{{end}}
- <time datetime="{{.When.Format "2006-01-02T15:04:05Z07:00"}}" title="{{.When.Format "2 January 2006, 15:04"}}">{{ago .When}}</time>
+ <time datetime="{{.When.Format "2006-01-02T15:04:05Z07:00"}}" title="{{stamp $.L .When}}">{{ago $.L .When}}</time>
</p>
{{if and .Held .Fields (ne .Kind "entry_added")}}
<dl fichas-history-values>
diff --git a/internal/fichas/templates/index.html b/internal/fichas/templates/index.html
index 6cced45..5785247 100644
--- a/internal/fichas/templates/index.html
+++ b/internal/fichas/templates/index.html
@@ -56,7 +56,7 @@
<h2 fichas-card-title><a href="{{$.List.OpenHref $c.Card.ID}}">{{$c.Title}}</a>{{with $face.Pill}}{{template "status-pill" (dict "Label" . "Tone" (stageTone .))}}{{end}}</h2>
{{range $face.Lines}}
{{if eq .Kind "call"}}<p fichas-card-quote>{{.Value}}</p>
- {{else if eq .Kind "date"}}<p fichas-meta>{{.Label}} <time datetime="{{.Date}}" title="{{.Date}}">{{dateAgo .Date}}</time></p>
+ {{else if eq .Kind "date"}}<p fichas-meta>{{.Label}} <time datetime="{{.Date}}" title="{{longDate $.L .Date}}">{{dateAgo $.L .Date}}</time></p>
{{else if eq .Kind "longtext"}}<p fichas-meta fichas-clamp>{{.Value}}</p>
{{else if eq .Kind "url"}}<p fichas-meta>{{displayURL .Value}}</p>
{{else if eq .Kind "number"}}<p fichas-meta>{{.Label}} <span fichas-number>{{showNumber $.L .Value}}</span></p>
@@ -107,7 +107,7 @@
{{if $c.IsTitle $f.Def.Key}}<th scope="row" fichas-title-cell><a fichas-title-link href="{{$.List.OpenHref $c.Card.ID}}">{{$c.Title}}</a></th>
{{else}}<td data-field="{{$f.Def.Key}}" data-kind="{{$f.Def.Kind}}" data-label="{{$f.Label}}" data-was="{{$f.Value}}" data-seed="{{seed $.L $f.Def $f.Value}}"{{if eq $f.Def.Kind "enum"}} data-options="{{range $i, $o := $f.Options}}{{if $i}}{{"\n"}}{{end}}{{$o}}{{end}}"{{end}}><a fichas-cell-link href="/cards/{{$c.Card.ID}}/edit?field={{$f.Def.Key}}&amp;return_to={{$.Here}}#{{$f.Def.Key}}">{{template "fichas-cell-value" (dict "F" $f "L" $.L)}}<span class="rst-sr-only">, change {{$f.Label}}</span></a></td>{{end}}
{{end}}{{end}}
- {{if index $.Shown "_last_call"}}<td data-readonly>{{with $c.Latest}}<time datetime="{{.Entry.CreatedAt.Format "2006-01-02"}}" title="{{.Entry.CreatedAt.Format "2 January 2006, 15:04"}}">{{ago .Entry.CreatedAt}}</time>{{else}}<span fichas-empty-cell>never</span>{{end}}</td>{{end}}
+ {{if index $.Shown "_last_call"}}<td data-readonly>{{with $c.Latest}}<time datetime="{{.Entry.CreatedAt.Format "2006-01-02"}}" title="{{stamp $.L .Entry.CreatedAt}}">{{ago $.L .Entry.CreatedAt}}</time>{{else}}<span fichas-empty-cell>never</span>{{end}}</td>{{end}}
</tr>
{{end}}
</tbody>
@@ -129,7 +129,7 @@
{{range $c := .Cards}}{{$face := $c.Face $.Face}}
<li><a href="{{$.List.OpenHref $c.Card.ID}}"{{if eq $c.Card.ID $open.Card.ID}} aria-current="true"{{end}}>
<strong>{{$c.Title}}</strong>
- <span fichas-narrow-face>{{with $face.Pill}}{{template "status-pill" (dict "Label" . "Tone" (stageTone .))}}{{end}}{{range $i, $l := $face.Lines}}{{if and (eq $i 0) (ne $l.Kind "call")}}<span fichas-meta>{{if eq $l.Kind "date"}}{{dateAgo $l.Date}}{{else if eq $l.Kind "number"}}{{showNumber $.L $l.Value}}{{else}}{{$l.Value}}{{end}}</span>{{end}}{{end}}</span>
+ <span fichas-narrow-face>{{with $face.Pill}}{{template "status-pill" (dict "Label" . "Tone" (stageTone .))}}{{end}}{{range $i, $l := $face.Lines}}{{if and (eq $i 0) (ne $l.Kind "call")}}<span fichas-meta>{{if eq $l.Kind "date"}}{{dateAgo $.L $l.Date}}{{else if eq $l.Kind "number"}}{{showNumber $.L $l.Value}}{{else}}{{$l.Value}}{{end}}</span>{{end}}{{end}}</span>
</a></li>
{{end}}
</ol>
diff --git a/internal/fichas/templates/partials.html b/internal/fichas/templates/partials.html
index 6c1159e..85d33d3 100644
--- a/internal/fichas/templates/partials.html
+++ b/internal/fichas/templates/partials.html
@@ -99,7 +99,7 @@
{{define "fichas-cell-value"}}{{$f := .F}}{{$v := $f.Value}}
{{- if not $v}}<span fichas-empty-cell>—</span>
{{- else if eq $f.Def.Kind "enum"}}{{template "status-pill" (dict "Label" $v "Tone" (stageTone $v))}}
-{{- else if eq $f.Def.Kind "date"}}<time datetime="{{$v}}" title="{{$v}}">{{dateAgo $v}}</time>
+{{- else if eq $f.Def.Kind "date"}}<time datetime="{{$v}}" title="{{longDate .L $v}}">{{dateAgo .L $v}}</time>
{{- else if eq $f.Def.Kind "number"}}<span fichas-number>{{showNumber .L $v}}</span>
{{- else if eq $f.Def.Kind "url"}}{{displayURL $v}}
{{- else}}{{$v}}{{end}}{{end}}
@@ -168,7 +168,7 @@
{{end}}{{end}}
<p fichas-card-meta>
<span>{{$c.TypeLabel}}</span>
- {{with .P.EditedBy}}<span>Edited by {{.}} <time datetime="{{$.P.EditedAt.Format "2006-01-02T15:04:05Z07:00"}}" title="{{$.P.EditedAt.Format "2 January 2006, 15:04"}}">{{ago $.P.EditedAt}}</time></span>{{end}}
+ {{with .P.EditedBy}}<span>Edited by {{.}} <time datetime="{{$.P.EditedAt.Format "2006-01-02T15:04:05Z07:00"}}" title="{{stamp $.L $.P.EditedAt}}">{{ago $.L $.P.EditedAt}}</time></span>{{end}}
{{if .Pane}}{{with .P.Pos}}<span>{{number $L .At}} of {{number $L .Total}}</span>{{else}}<span fichas-not-in-view>{{icon "info"}}Not in this view</span>{{end}}{{end}}
</p>
<div fichas-card-fields>
@@ -189,7 +189,7 @@
{{if $c.Entries}}
<ol fichas-timeline>
{{range $c.Entries}}
- <li><time datetime="{{.Entry.CreatedAt.Format "2006-01-02"}}" title="{{.Entry.CreatedAt.Format "2 January 2006, 15:04"}}">{{ago .Entry.CreatedAt}}</time><p>{{.Body}}</p></li>
+ <li><time datetime="{{.Entry.CreatedAt.Format "2006-01-02"}}" title="{{stamp $.L .Entry.CreatedAt}}">{{ago $.L .Entry.CreatedAt}}</time><p>{{.Body}}</p></li>
{{end}}
</ol>
{{else}}