lunar_calendar_converter 1.0.4+1 copy "lunar_calendar_converter: ^1.0.4+1" to clipboard
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.

Using #

Import the library:

import 'lunar_solar_converter.dart';

You can use this converter to convert between the lunar calendar and the solar calendar. For example:

Lunar lunar = Lunar(lunarYear: 2022, lunarMonth: 4, lunarDay: 1, isLeap: false);
Solar solar = LunarSolarConverter.lunarToSolar(lunar);
print(solar);

You will get 公元2022年5月1日.

or

Solar solar = Solar(solarYear: 2018, solarMonth: 8, solarDay: 22);
Lunar lunar = LunarSolarConverter.solarToLunar(solar);
print(lunar);

You will get 戊戌年(2018)七月十二.

10
likes
40
pub points
31%
popularity

Publisher

unverified uploader

A simple but useful library to convert between the lunar calendar and the solar calendar.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

More

Packages that depend on lunar_calendar_converter