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

outdated

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';

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) {
    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);
  // Result is a bool
  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