Use 3 letters month prefix in default date format (#4693)

This commit is contained in:
Maxime Beauchemin
2018-03-29 14:41:22 -07:00
committed by GitHub
parent ed9a56b4ab
commit 29678680ee
2 changed files with 26 additions and 6 deletions

View File

@@ -20,6 +20,19 @@ describe('formatDate', () => {
it('is a function', () => {
assert.isFunction(formatDate);
});
it('shows only year when 1st day of the year', () => {
expect(formatDate(new Date('2020-01-01'))).to.equal('2020');
});
it('shows month and year when 1st of month', () => {
expect(formatDate(new Date('2020-03-01'))).to.equal('Mar 2020');
});
it('shows weekday when any day of the month', () => {
expect(formatDate(new Date('2020-03-03'))).to.equal('Tue Mar 3');
expect(formatDate(new Date('2020-03-15'))).to.equal('Sun Mar 15');
});
});
describe('fDuration', () => {