-
Notifications
You must be signed in to change notification settings - Fork 156
Expand file tree
/
Copy pathtest_mask-yy.js
More file actions
32 lines (28 loc) · 851 Bytes
/
test_mask-yy.js
File metadata and controls
32 lines (28 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { strictEqual } from "node:assert";
import dateFormat from "../lib/dateformat.js";
describe("Mask: 'yy'", function () {
it("should format '1789-11-12' as '89'", function (done) {
var date = new Date("1789-11-12");
var d = dateFormat(date, "yy");
strictEqual(d, "89");
done();
});
it("should format '2089-10-2' as '89'", function (done) {
var date = new Date("2089-10-2");
var d = dateFormat(date, "yy");
strictEqual(d, "89");
done();
});
it("should format '2000-02-7' as '00'", function (done) {
var date = new Date("2000-02-7");
var d = dateFormat(date, "yy");
strictEqual(d, "00");
done();
});
it("should format '1999-11-27' as '99'", function (done) {
var date = new Date("1999-11-27");
var d = dateFormat(date, "yy");
strictEqual(d, "99");
done();
});
});