tibetan-date-calculator
Version:
A library to calculate tibetan calendar details. It is based on Svante Janson's paper www2.math.uu.se/~svante/papers/calendars/tibet.pdf
16 lines (13 loc) • 584 B
text/typescript
import { dayInDuplicateMonthMock } from '../../__mocks__';
import julianFromTibetan from '../julian-from-tibetan';
describe('julianFromTibetan()', () => {
const { year, month, day } = dayInDuplicateMonthMock;
it('should return the correct julian date for not leap month', () => {
expect(julianFromTibetan(year, month, false, day))
.toEqual(dayInDuplicateMonthMock.julianLeap);
});
it('should return the correct julian date for leap month', () => {
expect(julianFromTibetan(year, month, true, day))
.toEqual(dayInDuplicateMonthMock.julianMain);
});
});