colombia_holidays 2.1.4 copy "colombia_holidays: ^2.1.4" to clipboard
colombia_holidays: ^2.1.4 copied to clipboard

retractedoutdated

Flutter package to know the holidays in Colombia, you can get all the holidays per year or determine if a date is a holiday.

example/main.dart

import 'package:colombia_holidays/colombia_holidays.dart';
import 'package:flutter/foundation.dart';

void main() async {
  /// Create an instance
  ///
  ColombiaHolidays holidays = ColombiaHolidays();

  /// **This function returns a list of holidays for a given year**.
  ///
  /// Args:
  /// * [year]: The year for which you want to get the holidays....
  ///

  final holidaysByYear = await holidays.getHolidays(year: 2020);
  for (var holiday in holidaysByYear) {
    if (kDebugMode) {
      print(holiday.date);
    }
  }
  // Result is a List of Holidays
  /// **Checks if the given date is a holiday.
  ///
  /// Args:
  /// * [day]: Day of the month.
  /// * [month]: Month of the year.
  /// * [year]: year.
  ///
  final isHoliday = await holidays.isHoliday(day: 20, month: 12, year: 2022);

  if (kDebugMode) {
    print(isHoliday);
  }
}
4
likes
0
points
281
downloads

Publisher

verified publishersmart-dev.com.co

Weekly Downloads

Flutter package to know the holidays in Colombia, you can get all the holidays per year or determine if a date is a holiday.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on colombia_holidays