ethio-date-time
Version:
18 lines (17 loc) • 598 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const ethiopian_calendar_1 = require("./ethiopian-calendar");
const args = process.argv.slice(2);
if (args.length === 0) {
console.log('Usage: ethiocal <YYYY-MM-DD>');
process.exit(1);
}
const input = args[0];
const date = new Date(input);
if (isNaN(date.getTime())) {
console.error('Invalid date format. Use YYYY-MM-DD.');
process.exit(1);
}
const eth = ethiopian_calendar_1.EthiopianCalendar.toEthiopianDate(date);
console.log(`Ethiopian Date: ${eth.year}-${eth.month}-${eth.day}`);