Here you can find the source of getCurrentWeekFirst()
public static String getCurrentWeekFirst()
//package com.java2s; /******************************************************************************* * @(#)DateUtil.java Oct 23, 2007/* w ww . j a v a2 s.c o m*/ * * Copyright 2007 Neusoft Group Ltd. All rights reserved. * Neusoft PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. *******************************************************************************/ import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static String getCurrentWeekFirst() { StringBuffer str = new StringBuffer(); java.text.SimpleDateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd"); Calendar c = new GregorianCalendar(); c.setFirstDayOfWeek(Calendar.MONDAY); c.setTime(new Date()); c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek()); // Monday str.append(df.format(c.getTime())); str.append(" 00:00:00"); return str.toString(); } }