Skip to content
pubscout

lunar

1.7.9, released 2 weeks ago by 6tail.cn

A calendar library supporting Solar, Chinese Lunar, Taoist, and Buddhist calendars.

WASM-ready
$ flutter pub add lunar
Source repository

What it does

Provides tools for converting and querying dates across solar, Chinese lunar, Taoist, and Buddhist calendar systems. It calculates terms like zodiac signs, solar terms, traditional festivals, Bazi, and auspicious directions without external dependencies.

AI-written summary of version 1.7.9, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display Chinese lunar dates alongside standard solar dates.
  • Your app requires calculations for Bazi, solar terms, or traditional Chinese almanac data.

Skip it when

  • You only need standard Gregorian calendar utilities covered by core Dart libraries.

Strengths

  • Supports multiple traditional calendars including Lunar, Taoist, and Buddhist.
  • Zero external dependencies.
  • Includes statutory holidays and adjustments for multiple years.

Weaknesses

  • Documentation and API messages are primarily in Chinese.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:lunar/lunar.dart';

void main() {
  Lunar date = Lunar.fromYmd(1986, 4, 21);
  print(date.toFullString());
  print(date.getSolar().toFullString());
}

Alternatives

Packages that do the same job and could replace lunar.

  • vnlunar

    Convert between Vietnamese Lunar Calendar and Solar calendars.

  • full_calender

    Converts between solar and lunar calendars, Julian days, and calculates stems and branches.

  • general_datetime

    Chronology library for Gregorian, Persian, Hebrew, Chinese and Umm al‑Qura calendars with Flutter date‑picker adapters.