react-native-ethiopian-calendar-date-picker
Version:
A react native calendar component which is mainly intended for applications which require Ethiopian calendar.
23 lines (22 loc) • 779 B
JavaScript
;
var _ = require(".");
var _Core = require("../Core");
describe('EthiopicCalendar', () => {
const EC = new _.EthiopicCalendar();
test('should convert ethiopic date to jdn', () => {
expect(EC.toJDN(1855, 2, 20)).toEqual(2401442.5);
});
test('should convert from jdn to ethiopic date', () => {
expect(EC.fromJDN(2402422.5)).toEqual(new _Core.BasicDate(1857, 10, 29, 2402422.5));
});
test('should return true for leap year', () => {
expect(EC.isLeap(2011)).toEqual(true);
});
test('should return false for regular year', () => {
expect(EC.isLeap(2013)).toEqual(false);
});
test('should return true for leap day', () => {
expect(EC.validator(2011, 13, 6)).toBeTruthy();
});
});
//# sourceMappingURL=EthiopicCalendar.test.js.map