Java Minute Format calculateDayMinutes(String dayBegin, String dayEnd)

Here you can find the source of calculateDayMinutes(String dayBegin, String dayEnd)

Description

calculate Day Minutes

License

Apache License

Declaration

public static int calculateDayMinutes(String dayBegin, String dayEnd) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static int calculateDayMinutes(String dayBegin, String dayEnd) {
        int hour = Integer.parseInt(dayEnd.substring(0, 2)) - Integer.parseInt(dayBegin.substring(0, 2));
        int minute = Integer.parseInt(dayEnd.substring(3)) - Integer.parseInt(dayBegin.substring(3));
        return hour * 60 + minute;
    }//  www. j a  v  a  2 s .c o  m
}

Related

  1. calculateHourMinute(long ms)
  2. correctMinuteFormat(String minute)
  3. formatMinutes(double value)
  4. formatMinutes(int minutes)