Here you can find the source of getMonday(Calendar calendar)
public static Calendar getMonday(Calendar calendar)
//package com.java2s; /**//w w w . j a v a 2 s. c o m * License: https://github.com/votingsystem/votingsystem/wiki/Licencia */ import java.util.Calendar; public class Main { public static Calendar getMonday(Calendar calendar) { Calendar result = (Calendar) calendar.clone(); result.add(Calendar.DAY_OF_YEAR, -7); result.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); result.set(Calendar.HOUR_OF_DAY, 24); result.set(Calendar.MINUTE, 0); result.set(Calendar.SECOND, 0); result.set(Calendar.MILLISECOND, 0); return result; } }