Here you can find the source of sameDay(Calendar a, Calendar b)
Parameter | Description |
---|---|
a | Calendar |
b | Calendar |
public static boolean sameDay(Calendar a, Calendar b)
//package com.java2s; import java.util.Calendar; public class Main { /**//ww w.j ava 2 s .c om * * @param a * Calendar * @param b * Calendar * @return true if the Calendars describe the same day (day, month, year) */ public static boolean sameDay(Calendar a, Calendar b) { return a.get(Calendar.DAY_OF_YEAR) == b.get(Calendar.DAY_OF_YEAR) && a.get(Calendar.MONTH) == b.get(Calendar.MONTH) && a.get(Calendar.YEAR) == b.get(Calendar.YEAR); } }