Java Year Week getLastWeekOfYear()

Here you can find the source of getLastWeekOfYear()

Description

get Last Week Of Year

License

Open Source License

Declaration

public static String getLastWeekOfYear() 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {
    public static String getLastWeekOfYear() {
        int num = Calendar.getInstance().get(Calendar.WEEK_OF_YEAR);
        if (num > 1) {
            num--;/*from   w ww. j  a va  2s.  co  m*/
        }
        return (num + "").length() == 1 ? "0" + num : "" + num;
    }
}

Related

  1. getEndDayByWeekOfYear(int year, int weekNo)
  2. getLastDayOfWeek(int year, int week)
  3. getMaxWeekNumOfYear(int year)
  4. getNextWeekMonday(int year, int weekOfYear)
  5. getNumberOfWeeksInYear(int year)
  6. getSeasonStartWeekOffset(int year)