nepali_date_converter 1.0.3 copy "nepali_date_converter: ^1.0.3" to clipboard
nepali_date_converter: ^1.0.3 copied to clipboard

A Dart package to convert between Nepali (BS) and English (AD) dates.

Nepali Date Converter (BS ⇄ AD) #

License: MIT

A Flutter package for converting dates between Nepali Bikram Sambat (BS) and English Gregorian (AD) calendars using official calendar data from saralpatro.com.

Features #

  • 📅 Simple Date Conversion
    Convert between BS and AD.
  • 🗃️ Preloaded Dataset
    Includes dates from 1975 BS (1918 AD) to 2099 BS (2043 AD)
  • 🛡️ Type Safe
    Strongly typed NepaliDate and AdDate models
  • 🔍 Null Safe
    Returns null for dates outside dataset range

Installation #

Add this to your app's pubspec.yaml:

dependencies:
  nepali_date_converter: ^1.0.3

Basic Usage #

import 'package:nepali_date_converter/nepali_date_converter.dart';

BS → AD Conversion #

final bsDate = NepaliDate(year: 2081, month: 12, day: 16);
final adDate = converter.convertBsToAd(bsDate);
print(adDate); // AdDate(2025, 3, 30)

AD → BS Conversion #

final adDate = AdDate(year: 2025, month: 3, day: 30);
final bsDate = converter.convertAdToBs(adDate);
print(bsDate); // NepaliDate(2081, 12, 16)
1
likes
135
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart package to convert between Nepali (BS) and English (AD) dates.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on nepali_date_converter