Skip to content

Instantly share code, notes, and snippets.

View marlonlom's full-sized avatar
😎

Marlon López marlonlom

😎
View GitHub Profile
@marlonlom
marlonlom / dateDiff.spec.ts
Last active August 30, 2022 03:32 — forked from RienNeVaPlus/dateDiff.ts
🕤 dateDiff() - returns a detail object about the difference between two dates
describe('date-diff', () => {
it('Should check if no date diff results shown for comparing exact same dates', () => {
const date0 = new Date('2020-11-01T01:00:00');
const date1 = new Date('2020-11-01T01:00:00');
const expectedResult = {
millennium: 0,
century: 0,
decade: 0,
year: 0,
quarter: 0,