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

A custom recurrence rule implementation

example/recurrence_example.dart

import 'package:moment_dart/moment_dart.dart';
import 'package:recurrence/recurrence.dart';
import 'package:recurrence/src/interval.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 = WeekdayRecurrence(data: DateTime.monday).nextOccurrence(
    Moment.now(),
  );

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

Publisher

unverified uploader

Weekly Downloads

A custom recurrence rule implementation

Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

buymeacoffee.com

License

unknown (license)

Dependencies

moment_dart

More

Packages that depend on recurrence