Java Week getWeekOfMonth()

Here you can find the source of getWeekOfMonth()

Description

Used to know what week of the month it is to display a different image on the main page

License

Open Source License

Declaration

private static int getWeekOfMonth() 

Method Source Code


//package com.java2s;
/*/*from w ww . j a v a  2s  . co  m*/
 * Copyright (c) 2016 Boyter Online Services
 *
 * Use of this software is governed by the Fair Source License included
 * in the LICENSE.TXT file, but will be eventually open under GNU General Public License Version 3
 * see the README.md for when this clause will take effect
 *
 * Version 1.3.10
 */

import java.util.Calendar;

public class Main {
    /**
     * Used to know what week of the month it is to display a different image on the main page
     */
    private static int getWeekOfMonth() {
        Calendar cal = Calendar.getInstance();
        return cal.get(Calendar.WEEK_OF_MONTH);
    }
}

Related

  1. getWeekName()
  2. getWeekNumber(String sdate)
  3. getWeekNumberFromDate(String thedate)
  4. getWeekNumByDate(String date)
  5. getWeekNumner(String date)
  6. getWeekStartDate(Integer weekNumber)
  7. isSameWeek(Date curDate, Date compareDate)
  8. startOfWeek(Date date, String format)
  9. weekAgo()