/**
 * This function takes in a list of nurse's shifts for the month and returns a new list containing the dates of each shift.
 * The input list consists of pairs where each pair contains the shift start and end times.
 */
fun getShiftDates(shifts: List<Pair<String, String>>): List<String> {

    val shiftDates = mutableListOf<String>()  // Initialize an empty list to store the dates of each shift

    for (shift in shifts) {
        val (shiftStart, _) = shift  // Unpack the shift start time
        val shiftDate = shiftStart.substring(0, 10)  // Extract the date from the shift start time
        shiftDates.add(shiftDate)  // Append the date to the shiftDates list
    }

    return shiftDates
}

// Example usage
val nurseShifts = listOf(
    Pair("2022-01-01 08:00:00", "2022-01-01 16:00:00"),
    Pair("2022-01-05 12:00:00", "2022-01-05 20:00:00"),
    Pair("2022-01-10 20:00:00", "2022-01-11 04:00:00")
)

val scheduleDates = getShiftDates(nurseShifts)
/**
 * This function takes in a list of nurse's shifts for the month and returns a new list containing the dates of each shift.
 * The input list consists of pairs where each pair contains the shift start and end times.
 */
fun getShiftDates(shifts: List<Pair<String, String>>): List<String> {
/**
 * This function takes in a list of nurse's shifts for the month and returns a new list containing the dates of each shift.
 * The input list consists of pairs where each pair contains the shift start and end times.
 */
fun getShiftDates(shifts: List<Pair<String, String>>): List<String> {

    val shiftDates = mutableListOf<String>()  // Initialize an empty list to store the dates of each shift

    for (shift in shifts) {
        val (shiftStart, _) = shift  // Unpack the shift start time
        val shiftDate = shiftStart.substring(0, 10)  // Extract the date from the shift start time
        shiftDates.add(shiftDate)  // Append the date to the shiftDates list
    }

    return shiftDates
}

// Example usage
val nurseShifts = listOf(
    Pair("2022-01-01 08:00:00", "2022-01-01 16:00:00"),
    Pair("2022-01-05 12:00:00", "2022-01-05 20:00:00"),
    Pair("2022-01-10 20:00:00", "2022-01-11 04:00:00")
)

val scheduleDates = getShiftDates(nurseShifts)