shouldRotateDaily static method

bool shouldRotateDaily(
  1. DateTime fileDate, [
  2. DateTime? now
])

Check if a file should be rotated based on date

Implementation

static bool shouldRotateDaily(DateTime fileDate, [DateTime? now]) {
  final current = now ?? DateTime.now();
  return !isSameDay(fileDate, current);
}