Java Week of Year getWeekOfYear()

Here you can find the source of getWeekOfYear()

Description

get Week Of Year

License

Open Source License

Declaration

public static String getWeekOfYear() 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {
    public static String getWeekOfYear() {
        String num = Calendar.getInstance().get(Calendar.WEEK_OF_YEAR) + "";
        return num.length() == 1 ? "0" + num : num;
    }//from  w ww  .j a v a 2  s .c  om
}

Related

  1. getWeekOfPreYearWeek(int year, int week)
  2. getWeekOfYear(String year, String month, String day)
  3. getWeekOfYearByDay(String year, String month, String day)
  4. getWeekOfYearFromTimestamp(long ms)