Android Calendar Get getWeek(final Long date)

Here you can find the source of getWeek(final Long date)

Description

get Week

Declaration

public static String getWeek(final Long date) 

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  va2 s . com
        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(Calendar c)
  2. getSecond(Calendar c)
  3. getTimeByStr(String str)
  4. getTimeMillis()
  5. getWeek(final Calendar calendar)
  6. getYear()
  7. getYear(Calendar c)
  8. extractDateFromCalendarTime(Calendar time)
  9. extractTimeFromCalendarTime(Calendar time)