lunar_calendar_converter_new 2.0.0 copy "lunar_calendar_converter_new: ^2.0.0" to clipboard
lunar_calendar_converter_new: ^2.0.0 copied to clipboard

Please read README.md

Using #

Import the library:

import 'lunar_solar_converter.dart';

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

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

or

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

The Lunar class can also come out Chinese text for a lunar calendar, such as:

Lunar lunar = Lunar(lunarYear: 2018, lunarMonth: 8, lunarDay: 22);
print(lunar);

You will get 庚子年(2020)闰四月初一.

5
likes
100
pub points
73%
popularity

Publisher

unverified uploader

Please read README.md

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

More

Packages that depend on lunar_calendar_converter_new