// SPDX-FileCopyrightText: 2026 FocusFlow contributors
// SPDX-License-Identifier: AGPL-3.0-only

part of '../demo_scheduler_composition.dart';

/// Formats a civil date as a long month/day/year label.
String formatSchedulerDateLabel(CivilDate date) {
  const months = [
    'January',
    'February',
    'March',
    'April',
    'May',
    'June',
    'July',
    'August',
    'September',
    'October',
    'November',
    'December',
  ];
  return '${months[date.month - 1]} ${date.day}, ${date.year}';
}

/// Top-level helper that performs the `_instant` operation for this file.
/// Keeping the helper private makes the surrounding flow easier to read while preventing unrelated libraries from depending on implementation detail.
DateTime _instant(CivilDate date, int hour, [int minute = 0]) {
  return DateTime.utc(date.year, date.month, date.day, hour, minute);
}
