Java Calendar Day getThatMonday(Calendar cal)

Here you can find the source of getThatMonday(Calendar cal)

Description

get That Monday

License

Open Source License

Declaration

public static Calendar getThatMonday(Calendar cal) 

Method Source Code

//package com.java2s;
/*//from  w  ww .  j a v a2  s  . co  m
 * Title:      TRS ??????
 * Copyright: Copyright (c) 2004-2005, TRS?????????????. All rights reserved.
 * License:   see the license file.
 * Company:   TRS?????????????(www.trs.com.cn)
 * 
 * Created on 2005-5-11
 */

import java.util.Calendar;

public class Main {

    public static Calendar getThatMonday(Calendar cal) {
        int n = cal.get(Calendar.DAY_OF_WEEK) - Calendar.MONDAY;
        cal.add(Calendar.DATE, n);
        return cal;
    }
}

Related

  1. getPrincipalAfterCompoundingInterest( Calendar currentDate, Float principal, Integer depositPeriod, double interestPerDay, Integer compoundingInterval, Integer postingInterval)
  2. getRelativeCalendar(int offsetDays)
  3. getSafeTimeForAllDay(Calendar cal)
  4. getStartAndEndOfDay(Calendar calendar)
  5. getStartOfDay(Calendar cal)
  6. getTodayCalendar()
  7. getWorkingDay(Calendar beginDate, Calendar endDate)
  8. getWorkingDay(Calendar d1, Calendar d2)
  9. incrementDay(Calendar cal)