Android Calendar Get getLastOfWeek(Calendar cal, int week)

Here you can find the source of getLastOfWeek(Calendar cal, int week)

Description

get Last Of Week

Declaration

public static Timestamp getLastOfWeek(Calendar cal, int week) 

Method Source Code

//package com.java2s;

import java.sql.Timestamp;

import java.util.Calendar;

public class Main {
    public static Timestamp getLastOfWeek(Calendar cal, int week) {
        if (cal == null) {
            cal = Calendar.getInstance();
        }/* w ww. jav a 2 s .  c o m*/
        cal.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);
        cal.set(Calendar.HOUR_OF_DAY, 23);
        cal.set(Calendar.MINUTE, 59);
        cal.set(Calendar.SECOND, 59);
        cal.set(Calendar.MILLISECOND, 999);
        return new Timestamp(cal.getTimeInMillis());
    }
}

Related

  1. getFirstOfWeek(Calendar cal, int week)
  2. getFragmentInDays(Calendar calendar, int fragment)
  3. getFragmentInHours(Calendar calendar, int fragment)
  4. getGuessedDateString()
  5. getHour(Calendar c)
  6. getMaxTimeMillisToday()
  7. getMaxTimeMillisToday(final Calendar calendar)
  8. getMinTimeMillisToday()
  9. getMinTimeMillisToday(final Calendar calendar)