Here you can find the source of copyYearMonthDay(Calendar destCal, Calendar sourceCal)
public static void copyYearMonthDay(Calendar destCal, Calendar sourceCal)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static void copyYearMonthDay(Calendar destCal, Calendar sourceCal) { destCal.set(1, sourceCal.get(1)); destCal.set(2, sourceCal.get(2)); destCal.set(5, sourceCal.get(5)); }//from ww w . ja va 2 s . c o m }