Skip to content

Commit

Permalink
new isBetween func
Browse files Browse the repository at this point in the history
  • Loading branch information
ubbabeck committed Aug 11, 2023
1 parent 1298779 commit 9a6b001
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/utils/date.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ class BreezDateUtils {
}
}

static bool isBetween(
DateTime date,
DateTime fromDateTime,
DateTime toDateTime,
) {
final isAfter = date.isAfter(fromDateTime);
final isBefore = date.isBefore(toDateTime);
return isAfter && isBefore;
}

static String formatHourMinute(DateTime d) => _hourMinuteDayFormat.format(d);

static String formatFilterDateRange(DateTime startDate, DateTime endDate) {
Expand Down

0 comments on commit 9a6b001

Please sign in to comment.