copy one Calendar To another Calendar for year, month, day - Android java.util

Android examples for java.util:Month

Description

copy one Calendar To another Calendar for year, month, day

Demo Code


//package com.java2s;

import java.util.Calendar;

public class Main {
    public static void copyTo(Calendar from, Calendar to) {
        int year = from.get(Calendar.YEAR);
        int month = from.get(Calendar.MONTH);
        int day = from.get(Calendar.DAY_OF_MONTH);
        to.set(year, month, day);/*from   w  w w.ja  va 2s .c o m*/
        to.getTimeInMillis();
    }
}

Related Tutorials