lunar_calendar_converter 1.0.4+1 lunar_calendar_converter: ^1.0.4+1 copied to clipboard
A simple but useful library to convert between the lunar calendar and the solar calendar.
import './../lib/lunar_solar_converter.dart';
void main(List<String> arguments) {
Lunar lunar = Lunar(lunarYear: 2020, lunarMonth: 4, lunarDay: 4, isLeap: true);
var result1 = LunarSolarConverter.lunarToSolar(lunar);
var dateTime = result1.dateTime;
print("$lunar -> $result1 / $dateTime");
Solar solar = Solar(solarYear: 2020, solarMonth: 5, solarDay: 26);
Lunar result2 = LunarSolarConverter.solarToLunar(solar);
print("$solar -> $result2");
}