Here you can find the source of convertIntToCalendarDayOfWeek(int dayOfWeek)
public static int convertIntToCalendarDayOfWeek(int dayOfWeek)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static int convertIntToCalendarDayOfWeek(int dayOfWeek) { return dayOfWeek == Calendar.SUNDAY ? 7 : dayOfWeek - 1; }/*from ww w . j a va 2s . c om*/ }