Java Calendar Calculate cloneCalendar(Calendar in)

Here you can find the source of cloneCalendar(Calendar in)

Description

{ method

License

Apache License

Parameter

Parameter Description
del increment

Return

new date }

Declaration

public static Calendar cloneCalendar(Calendar in) 

Method Source Code

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

import java.util.*;

public class Main {
    /**{ method//from w  ww  .  j  a  v  a  2 s . c  o  m
     @name cloneCalendar
     @function return a copy oif the input Calendar
     @param del increment
     @return new date
     }*/
    public static Calendar cloneCalendar(Calendar in) {
        GregorianCalendar then = new GregorianCalendar(in.get(Calendar.YEAR), in.get(Calendar.MONTH),
                in.get(Calendar.DATE), in.get(Calendar.HOUR_OF_DAY), in.get(Calendar.MINUTE),
                in.get(Calendar.SECOND));
        return (then);
    }
}

Related

  1. calculateMonthsInBetween(Calendar startPoint, Calendar endPoint)
  2. calculateRangeInDays(Calendar start, Calendar end)
  3. calculateWeeksInBetween(Calendar startPoint, Calendar endPoint)
  4. calDateOnly(Calendar iniCal)
  5. calendarIterator(final int iterateType, final Calendar startCal, final Calendar endCal)
  6. copyCalendar(final Calendar calendar, final boolean stripTime)
  7. decode(String timestamp, Calendar calendar)
  8. encode(Calendar calendar, boolean encodeTzOffset, StringBuilder buf)
  9. equals(Calendar calendar1, Calendar calendar2)