mirror of https://github.com/keeweb/keeweb
Tests now are UTC based to avoid locale conflicts
parent
32b871e338
commit
4b65792585
|
@ -2,14 +2,14 @@ import { expect } from 'chai';
|
|||
import { DateFormat } from 'util/formatting/date-format';
|
||||
|
||||
describe('DateFormat', () => {
|
||||
const dt = new Date(2020, 0, 2, 3, 4, 5, 6);
|
||||
const dt = new Date.UTC(2020, 0, 2, 3, 4, 5, 6);
|
||||
|
||||
it('should format date', () => {
|
||||
expect(DateFormat.dStr(dt)).to.eql('2 Jan 2020');
|
||||
expect(DateFormat.dStr(dt)).to.eql('Jan 2, 2020');
|
||||
});
|
||||
|
||||
it('should format date and time', () => {
|
||||
expect(DateFormat.dtStr(dt)).to.eql('2 Jan 2020 03:04:05');
|
||||
expect(DateFormat.dtStr(dt)).to.eql('Jan 2, 2020, 03:04:05 AM');
|
||||
});
|
||||
|
||||
it('should format date and time in sortable format', () => {
|
||||
|
|
Loading…
Reference in New Issue