myanmar_calendar_dart 1.1.4 copy "myanmar_calendar_dart: ^1.1.4" to clipboard
myanmar_calendar_dart: ^1.1.4 copied to clipboard

A comprehensive dart package for Myanmar calendar with date conversions, astrological calculations, and multi-language support

example/lib/main.dart

import 'package:myanmar_calendar_dart/myanmar_calendar_dart.dart';

void main() {
  // Configure the calendar (optional)
  MyanmarCalendar.configure(
    language: Language.english,
    timezoneOffset: 0, // Myanmar Standard Time
    customHolidays: [
      CustomHoliday(
        id: 'my_birthday',
        name: 'My Birthday',
        type: HolidayType.other,
        predicate: (myanmarDate, westernDate) {
          return westernDate.day == 27 && westernDate.month == 7;
        },
      ),
    ],
  );

  // Get today's date
  final today = MyanmarCalendar.today();
  print('Today: ${today.formatComplete()}');

  // Convert Western date to Myanmar
  final myanmarDate = MyanmarCalendar.fromWestern(1998, 7, 27);
  print('Myanmar: ${myanmarDate.formatMyanmar()}');
  print('Western: ${myanmarDate.formatWestern()}');
  final holidays = myanmarDate.otherHolidays;
  print('Other Holidays: $holidays');
}
0
likes
160
points
294
downloads

Publisher

verified publisherkyawzayartun.com

Weekly Downloads

A comprehensive dart package for Myanmar calendar with date conversions, astrological calculations, and multi-language support

Repository (GitHub)
View/report issues

Topics

#calendar #myanmar-calendar #myanmar-datetime #utility #date-converter

Documentation

API reference

License

MIT (license)

Dependencies

collection, meta

More

Packages that depend on myanmar_calendar_dart