in_date_range 1.1.0 copy "in_date_range: ^1.1.0" to clipboard
in_date_range: ^1.1.0 copied to clipboard

Encapsulates a start and end DateTime that represent the range of dates.

example/main.dart

// ignore_for_file: avoid_print
import 'package:in_date_range/in_date_range.dart';

void main() {
  final today = DateRange.today();
  print('Today range: $today');

  final week = DateRange.week(DateTime(2021, 6, 9));
  print('Week that contains 2021/06/09 range: $week');

  final month = DateRange.month(DateTime(2021, 6, 9));
  print('Month that contains 2021/06/09 range: $month');

  final year = DateRange.year(DateTime(2021, 6, 9));
  print('Year that contains 2021/06/09 range: $year');

  final custom = DateRange(
    DateTime(2021, 6, 9, 18, 20),
    DateTime(2021, 6, 10, 17, 00),
  );
  print('Custom range: $custom');
}
3
likes
140
pub points
68%
popularity

Publisher

verified publisherinnim.ru

Encapsulates a start and end DateTime that represent the range of dates.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

equatable, in_date_utils

More

Packages that depend on in_date_range