Add Timestamp to DateFormat (#7043)

* add Timestamp to DateFormat

* improve TIMESTAMP documentation
This commit is contained in:
Maurycy Zarzycki
2022-11-21 17:13:34 +01:00
committed by GitHub
parent 8ead7e0624
commit d32d559f93
3 changed files with 29 additions and 1 deletions

View File

@@ -78,6 +78,7 @@ describe("Utility tests", function() {
expect(fds(d,"ddd hh mm ssss")).toBe("Sun 17 41 2828");
expect(fds(d,"MM0DD")).toBe("1109");
expect(fds(d,"MM0\\D\\D")).toBe("110DD");
expect(fds(d,"TIMESTAMP")).toBe(d.getTime().toString());
const day = d.getUTCDate();
const dayStr = ("" + day).padStart(2, '0');
const hours = d.getUTCHours();