Android Calendar Get getWeek(final Calendar calendar)

Here you can find the source of getWeek(final Calendar calendar)

Description

get Week

Declaration

public static String getWeek(final Calendar calendar) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {
    public static String getWeek(final Long date) {
        final Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(date);/*from  w  w  w  .  ja  v a 2s  .  c  o m*/
        return getWeek(calendar);
    }

    public static String getWeek(final Calendar calendar) {
        final int weekOfYear = calendar.get(Calendar.WEEK_OF_YEAR);
        return String.valueOf(weekOfYear);
    }
}

Related

  1. getMonth()
  2. getMonth(Calendar c)
  3. getSecond(Calendar c)
  4. getTimeByStr(String str)
  5. getTimeMillis()
  6. getWeek(final Long date)
  7. getYear()
  8. getYear(Calendar c)
  9. extractDateFromCalendarTime(Calendar time)