Here you can find the source of getFirstDayOfWeek()
public static int getFirstDayOfWeek()
//package com.java2s; /*// ww w. j av a2 s. c o m * File: DateUtils.java * Copyright (c) 2004-2007 Peter Kliem (Peter.Kliem@jaret.de) * A commercial license is available, see http://www.jaret.de. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html */ import java.util.Calendar; public class Main { /** cache for the first day of the week. */ private static int _firstDayofWeek = -1; /** * Retrieve the first day of the week using the systems default locale. * * @return the first day of the week as defiend in gregoriean calendar for the current default locale. */ public static int getFirstDayOfWeek() { if (_firstDayofWeek != -1) { return _firstDayofWeek; } Calendar cal = Calendar.getInstance(); _firstDayofWeek = cal.getFirstDayOfWeek(); return _firstDayofWeek; } }