Here you can find the source of dayOfWeekRus(Date d)
Parameter | Description |
---|---|
d | from which to calculate this day of week |
public static int dayOfWeekRus(Date d)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { /**/*from w w w.ja va 2 s. c o m*/ * @param d from which to calculate this day of week * @return integer for day of week from 1 to 7 */ public static int dayOfWeekRus(Date d) { // TODO check Calendar date = new GregorianCalendar(); date.setTime(d); int dow = date.get(Calendar.DAY_OF_WEEK); dow = dow == 1 ? 7 : dow - 1; return dow; } }