I once had to make a library to covert dates between Bikram Sambat calendar en.m.wikipedia.org/wiki/Vikram_Samvat and the Gregorian calendar. That thing additionally had to do various calculations like leave days.
Not much of code, but because the calendar systems are so different and there are so many edge cases it was really hard to test manually. But a good set of (unit) tests did rescue me.
I never had to touch that lib again after is got into production
I suppose that was not easy to work with timezone. Or Is it not apply? For my cases of tests with date time are always hard thing to do, especially with moment.js.
I once had to make a library to covert dates between Bikram Sambat calendar en.m.wikipedia.org/wiki/Vikram_Samvat and the Gregorian calendar. That thing additionally had to do various calculations like leave days.
Not much of code, but because the calendar systems are so different and there are so many edge cases it was really hard to test manually. But a good set of (unit) tests did rescue me.
I never had to touch that lib again after is got into production
I suppose that was not easy to work with timezone. Or Is it not apply? For my cases of tests with date time are always hard thing to do, especially with moment.js.
timezone hasn't been a problem, just pure date conversion between different calendar systems