Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static boolean isThisWeek(int dateToCheck) { int dayOfWeek = getCurrentDay(); if (dayOfWeek == Calendar.SATURDAY) { return dayOfWeek > dateToCheck; } else { return dayOfWeek < dateToCheck; } } private static int getCurrentDay() { return Calendar.getInstance().get(Calendar.DAY_OF_WEEK); } }