Skip to content

Commit

Permalink
Fix danish locale to not use definite singular expression for weekdays
Browse files Browse the repository at this point in the history
Fixes #327
  • Loading branch information
rmja committed Nov 21, 2024
1 parent a316df4 commit 7c2b7b3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/i18n/locales/da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class da implements Locale {
return ", kun i %s";
}
commaOnlyOnX0() {
return ", kun på %s";
return ", på %se";
}
commaAndOnX0() {
return ", og på %s";
Expand Down
11 changes: 10 additions & 1 deletion test/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import "mocha";
import chai = require("chai");

import cronstrue from "../src/cronstrue-i18n";

import chai = require("chai");
let assert = chai.assert;

describe("i18n", function () {
Expand Down Expand Up @@ -342,6 +344,13 @@ describe("i18n", function () {
"Hvert 5. minut, mellem 15:00 og 15:59, mandag til og med fredag"
);
});

it("0 3 * * 4", function () {
assert.equal(
cronstrue.toString(this.test?.title as string, { locale: "da" }),
"Kl 03:00, på torsdage"
);
});
});

describe("fa", function () {
Expand Down

0 comments on commit 7c2b7b3

Please sign in to comment.