recurrence 0.2.1 copy "recurrence: ^0.2.1" to clipboard
recurrence: ^0.2.1 copied to clipboard

A custom recurrence rule implementation that heavily relies on moment_dart. Heads up, the serialization is little weird.

example/recurrence_example.dart

// ignore_for_file: unused_local_variable
import 'package:moment_dart/moment_dart.dart';
import 'package:recurrence/recurrence.dart';

void main() {
  final CustomTimeRange aYearFromNow = CustomTimeRange(
    Moment.now(),
    Moment.now().add(
      Duration(days: 365),
    ),
  );

  final everyOtherWeekStartingToday = IntervalRecurrenceRule(
    data: Duration(days: 14),
  ).occurrences(
    range: aYearFromNow,
  );

  final nextMonday =
      WeeklyRecurrenceRule(weekday: DateTime.monday).nextOccurrence(
    Moment.now(),
  );

  final allFirstOfMayThisCentury = YearlyRecurrenceRule(
    month: DateTime.may,
    day: 1,
  ).occurrences(
    range: CustomTimeRange(
      DateTime(2000),
      DateTime(2099).endOfYear(),
    ),
  );
}
1
likes
160
points
57
downloads

Publisher

unverified uploader

Weekly Downloads

A custom recurrence rule implementation that heavily relies on moment_dart. Heads up, the serialization is little weird.

Repository (GitHub)
View/report issues

Documentation

API reference

Funding

Consider supporting this project:

buymeacoffee.com

License

MIT (license)

Dependencies

moment_dart

More

Packages that depend on recurrence