Converts a given lunar date to a solar (Gregorian) date. The function calculates the corresponding solar year, month, and day from the lunar date. If the lunar date is invalid or out of range, it returns -1.
The lunar date object to convert. It should be a valid LunarDate object.
LunarDate
A Date object representing the corresponding solar date, or -1 if the lunar date is invalid.
Date
// => 2025-01-30T00:00:00.000ZtoSolar({ year: 2025, month: 1, day: 30, isLeapMonth: false }) Copy
// => 2025-01-30T00:00:00.000ZtoSolar({ year: 2025, month: 1, day: 30, isLeapMonth: false })
// => -1toSolar({ year: 1900, month: 1, day: 30, isLeapMonth: false }) Copy
// => -1toSolar({ year: 1900, month: 1, day: 30, isLeapMonth: false })
Converts a given lunar date to a solar (Gregorian) date. The function calculates the corresponding solar year, month, and day from the lunar date. If the lunar date is invalid or out of range, it returns -1.