package de.accso.flexinale.shared_kernel;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class TimeFormatter {
    public static String calculateString(final LocalDateTime from, final Integer durationInMinutes) {
        DateTimeFormatter hourMinuteFormatter = DateTimeFormatter.ofPattern("HH:mm");

        return hourMinuteFormatter.format(from)
                + " - "
                + hourMinuteFormatter.format(from.plusMinutes(durationInMinutes));
    }
}
