nepali_calendar_new 0.0.1 copy "nepali_calendar_new: ^0.0.1" to clipboard
nepali_calendar_new: ^0.0.1 copied to clipboard

A new Flutter package for Nepali Calender.

Nepali Calendar Package #

The Nepali Calendar Package is a powerful tool for working with the Nepali calendar system in your Flutter applications. It provides various functionalities to convert dates between the Gregorian and Nepali calendars, display Nepali calendar events, and perform date calculations.

Features #

  • Conversion between Gregorian and Nepali dates
  • Displaying Nepali calendar events
  • Date calculations such as adding or subtracting days, months, or years
  • Formatting dates in the Nepali calendar system

Installation #

To use the Nepali Calendar Package in your Flutter project, add the following dependency to your pubspec.yaml file:

dependencies:
  nepali_calendar: ^1.0.0

Then, run flutter pub get to fetch the package.

Usage #

Import the package in your Dart file:

import 'package:nepali_calendar/nepali_calendar.dart';

Now, you can start using the various functionalities provided by the package. Here are a few examples:

// Convert Nepali date to Gregorian date
DateTime gregorianDate = nepaliDate.toDateTime();

// Convert Gregorian date to Nepali date
NepaliDateTime nepaliDate = NepaliDateTime.fromDateTime(DateTime.now());

// Add 5 days to a Nepali date
NepaliDateTime newDate = nepaliDate.add(Duration(days: 5));

// Format a Nepali date
String formattedDate = NepaliDateFormat("yyyy-MM-dd").format(nepaliDate);

// Display Nepali calendar events
List<NepaliEvent> events = [
    NepaliEvent(
        date: NepaliDateTime(2079, 1, 1),
        title: 'New Year',
        description: 'Celebrate the start of the Nepali New Year!'
    ),
    NepaliEvent(
        date: NepaliDateTime(2079, 4, 14),
        title: 'Bisket Jatra',
        description: 'Enjoy the vibrant festival of Bisket Jatra!'
    ),
];

// Display a calendar with events
NepaliCalendar(
    events: events,
    initialDate: NepaliDateTime.now(),
    onDateSelected: (date) {
        // Handle date selection
    },
);

For more details on how to use the Nepali Calendar Package, refer to the documentation.

Contributing #

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue on the GitHub repository.

License #

This package is released under the MIT License.

0
likes
120
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter package for Nepali Calender.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter

More

Packages that depend on nepali_calendar_new