time_overlapping
0.1.0, released 3 years ago by an unverified publisher
Check overlapping DateTime ranges in a list of ranges
What it does
The package provides a lightweight utility to determine which DateTime ranges overlap. It returns overlapping IDs, the overlapping objects, or a boolean for two ranges.
AI-written summary of version 0.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- Detecting scheduling conflicts
- Validating event overlaps in calendars
- Ensuring non-overlapping time slots
Skip it when
- Complex recurrence rules or non-DateTime intervals
- When you need to handle time zones or daylight saving adjustments
Strengths
- Fast and lightweight
- Simple API with no code generation
- Handles duplicate ID assertion
Weaknesses
- Only works with DateTimeRange
- No support for recurring events or time zone conversions
- Limited to Flutter platform
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
final range1 = DateTimeRange(start: DateTime.now(), end: DateTime.now().add(const Duration(hours: 2)));
final range2 = DateTimeRange(start: DateTime.now(), end: DateTime.now().add(const Duration(hours: 1)));
final overlapParams = [
OverlapParams('001', range1, {}),
OverlapParams('002', range2, {}),
];
print(TimeOverlapFinder.findOverlap(overlapParams));Alternatives
Packages that do the same job and could replace time_overlapping.
- timezone
Time zone databases and time zone aware DateTime class in Dart.
94Compare - get_time_ago
Relative time formatting for Dart and Flutter supporting 22 locales and CLDR plurals.
82Compare - ntp_dart
Cross-platform NTP and SNTP time synchronization client for Dart and Flutter.
73Compare - tempo
A time and date solution replacing core DateTime with advanced arithmetic and time zone support.
71Compare
Works with
Packages commonly used together with time_overlapping: ones it builds on, ones built on it, and its own family.