搜索插件、代码仓与 APP 分类

插件详情v1.2.86

full_calender

全功能日历Flutter库可轻松实现公历、农历和儒略日之间的转换,重点支持越南农历系统。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
195
喜欢数
47
Pub 分数
160

安装插件

flutter pub add full_calender

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Full Calendar Flutter 库可实现公历、农历和儒略历之间的平滑转换,并专门支持越南农历日历系统。它提供精确的日期计算,非常适合需要特定文化日历功能的应用程序。该库可在所有主要平台上兼容,包括 Android、iOS、Web、macOS、Windows 和 Linux,是国际化应用程序的多功能选择。通过 Flutter Pub 集成简单,确保快速设置和可靠性能。

适合场景

  • 越南文化活动策划
  • 农历节日日期计算
  • 基于日历的提醒系统
  • 国际日期转换
  • 历史日期分析
  • 应用中的多日历显示

主要特点

  • 越南农历日历支持
  • 日月-Julian 转换
  • 跨平台兼容性
  • 精确的日期算术
  • 轻松集成 Flutter Pub
  • 对历史日期和未来日期的支持

适合对象

  • 面向越南用户的App
  • 文化或宗教活动策划者
  • 带有日历功能的教育工具
  • 国际日期转换工具
  • 需要月历逻辑的开发者

使用建议

  • 限于太阳/月亮/儒略系统
  • 无内置 UI 组件
  • 需要手动处理日历显示
  • 依赖于准确的输入日期
  • 未针对高频更新进行优化
  • 仅支持越南语上下文的本地化

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

💰 Sponsor for my work:
  • Momo: Tài trợ qua MoMo

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: 

Then run:

$ flutter pub get

Import the library in your Dart code:

import 'package:full_calender/full_calender.dart';

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

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

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]

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

For more examples, check out the example directory.

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

所属分类

源码仓库

使用此插件的项目

暂无相关数据。