Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Calendar;

public class Main {
    /**
     * Given a calendar date, find a logical end time for an event.  Most likely one hour later.
     * @param fromCalendar
     * @return endCalendar
     */
    public static Calendar getLogicalEnd(Calendar fromCalendar) {
        Calendar endCalendar = (Calendar) fromCalendar.clone();
        endCalendar.add(Calendar.HOUR_OF_DAY, 1);
        return endCalendar;
    }
}