package de.duehl.basics.start;

import de.duehl.basics.datetime.DateAndTime;
import de.duehl.basics.datetime.date.ImmutualDate;
import de.duehl.basics.datetime.time.ImmutualTime;
import de.duehl.basics.datetime.time.TimeHelper;

public class TimeDifference {

    public static void main(String[] args) {
        ImmutualDate dateFrom = new ImmutualDate(16,  6, 2017);
        ImmutualTime timeFrom = new ImmutualTime(13, 19,  0);

        ImmutualDate dateTo = new ImmutualDate(18,  6, 2017);
        ImmutualTime timeTo = new ImmutualTime(10, 11,  0);

        DateAndTime from = new DateAndTime(dateFrom, timeFrom);
        DateAndTime to = new DateAndTime(dateTo, timeTo);

        long seconds = from.difference(to);
        String hoursMinutesSeconds = TimeHelper.secondsToHoursMinutesSeconds(seconds);

        System.out.println(hoursMinutesSeconds);
    }

}
