full_calender 1.2.12 copy "full_calender: ^1.2.12" to clipboard
full_calender: ^1.2.12 copied to clipboard

The Full Calendar Flutter Library facilitates seamless conversion between solar, lunar calendars and Julian days, with a focus on the Vietnamese lunar calendar system.

Full Calendar Flutter Library #

Welcome to the Full Calendar Library! This library provides a comprehensive set of tools for working with lunar dates, stems, branches, and more, making it easy to integrate traditional calendar features into your Flutter applications.

Features #

  • Lunar Date Conversion: Easily convert between solar and lunar dates.
  • Number of Julian day Conversion: Easily convert solar and lunar dates to number of Julian day.
  • Stems and Branches: Retrieve stems and branches for years, months, days, and hours.
  • Multilingual Support: Get names and representations in various languages.
  • Lucky Day and Hour Detection: Find out if a day or hour is considered lucky based on lunar calendar principles.

Getting Started #

To use this library, add the following dependency to your pubspec.yaml file:

dependencies:
  full_calender: 
copied to clipboard

Then run:

$ flutter pub get
copied to clipboard

Import the library in your Dart code:

import 'package:full_calender/full_calender.dart';
copied to clipboard

Usage #

Lunar Date Conversion

// Convert lunar date to solar date
final lunarDate = LunarDateTime(year: 2023, month: 11, day: 10);
final solarDate = FullCalenderExtension.convertLunarDateToSolarDate(lunarDate);
print(solarDate); // Output: 2023-12-28
copied to clipboard

Stems and Branches

// Get stem and branch for a specific year
final stemBranchOfYear = StemBranch.year(2023);
print(stemBranchOfYear.name(LanguageName.vietNam)); // Output: Kỷ Hợi
copied to clipboard

Lucky Day and Hour Detection

// Check if a specific day is considered lucky
final luckyDay = FullCalender(date: DateTime(2023, 12, 28)).lunarDate.isLuckyDay;
print(luckyDay); // Output: true

// Get a list of lucky hours for a specific date
final luckyHours = FullCalender(date: DateTime(2023, 11, 20)).lunarDate.listLuckyHours;
print(luckyHours); // Output: [true, true,false,true,false,false,true,false,true,true,false,false]
copied to clipboard

Stems and Branches

// Get stem and branch for a specific year
final stemBranchOfYear = StemBranch.year(2023);
print(stemBranchOfYear.name(LanguageName.vietNam)); // Output: Kỷ Hợi
copied to clipboard

For more examples, check out the example directory.

Issues and Feedback Please file issues or provide feedback on our GitHub repository.

37
likes
160
points
559
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.25 - 2025.04.09

The Full Calendar Flutter Library facilitates seamless conversion between solar, lunar calendars and Julian days, with a focus on the Vietnamese lunar calendar system.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on full_calender