Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.
JavaScript apple-watchbodyweightdockerfitnessfitness-trackergymhealthiosmcpnodejspasskeysprogressive-web-applicationspwareactself-hostedself-hostingvitewebauthnweightliftingworkout-tracker
Import: a Dutch export's March rows come in, written out as maart or shortened to mrt. (#273)
Duarte Santos5c30829b82e1
diff --git a/frontend/src/lib/import-csv.js b/frontend/src/lib/import-csv.jsindex 4a5edb238..b65bc06bf 100644--- a/frontend/src/lib/import-csv.js+++ b/frontend/src/lib/import-csv.js@@ -335,8 +335,9 @@ const MON = {sept: 9, octo: 10, nove: 11, dece: 12,// Spanish · Portugueseene: 1, fev: 2, abr: 4, ago: 8, set: 9, out: 10, dic: 12,- // German · Dutch- mrz: 3, mei: 5, okt: 10, dez: 12,+ // German · Dutch — Dutch spells March "maart" and shortens it "mrt.", neither of which shares+ // a prefix with any other language's March, so both are keys of their own.+ mrz: 3, mei: 5, okt: 10, dez: 12, maart: 3, mrt: 3,// Italiangen: 1, mag: 5, giu: 6, lug: 7, ott: 10,}diff --git a/frontend/src/lib/import-csv.test.js b/frontend/src/lib/import-csv.test.jsindex 2df6ad480..7d170a455 100644--- a/frontend/src/lib/import-csv.test.js+++ b/frontend/src/lib/import-csv.test.js@@ -141,6 +141,21 @@ describe('localized month names', () => {expect(parseWhen('2 luglio 2024').d).toBe('2024-07-02')})+ // Dutch writes March as "maart" (short "mrt."), which none of the prefixes above reach: every+ // March row of a Dutch export was skipped. The rest of the Dutch year shares its keys with others.+ it('reads all twelve Dutch months, written out and shortened', () => {+ const long = ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december']+ const short = ['jan.', 'feb.', 'mrt.', 'apr.', 'mei', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.']+ for (const names of [long, short]) {+ names.forEach((name, i) => {+ const input = `4 ${name} 2024, 18:00`+ expect(parseWhen(input), input).toMatchObject({ d: `2024-${String(i + 1).padStart(2, '0')}-04` })+ })+ }+ // a word that only starts like it is still no month+ expect(parseWhen('4 maar 2024')).toBe(null)+ })+it('still reads English, month-first and numeric dates', () => {expect(parseWhen('18 Sep 2022, 10:30')).toMatchObject({ d: '2022-09-18' })expect(parseWhen('22 Dec 2025, 08:00')).toMatchObject({ d: '2025-12-22' })