Clone Calendar value - Android java.util

Android examples for java.util:Calendar

Description

Clone Calendar value

Demo Code


//package com.java2s;
import java.util.Calendar;

public class Main {
    public static Calendar copyCalendar(Calendar calendarToCopy) {
        Calendar newCalendar = Calendar.getInstance();
        newCalendar.setTime(calendarToCopy.getTime());
        return newCalendar;
    }/*from  www  .  j a  va  2 s . co m*/
}

Related Tutorials