Java Week Day getWeekBeginDay(String date)

Here you can find the source of getWeekBeginDay(String date)

Description

get Week Begin Day

License

Apache License

Declaration

public static String getWeekBeginDay(String date) throws ParseException 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main {

    public static String getWeekBeginDay(String date) throws ParseException {
        Calendar cal = Calendar.getInstance();
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
        cal.setTime(df.parse(date));/*w  w w  .  j  a v  a 2  s. c  om*/
        cal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
        return df.format(cal.getTime());
    }
}

Related

  1. getSQLForWeekSunday(String weekString)
  2. getSundayOfWeek()
  3. getThisWeekMonday()
  4. getTodayOfWeek()
  5. getWeek(Date today, int index, String format)
  6. getWeekDay()
  7. GetWeekDay()
  8. getWeekDay()
  9. getWeekday(Date date)