Android Calendar Get getYear(Calendar c)

Here you can find the source of getYear(Calendar c)

Description

get Year

Declaration

public static int getYear(Calendar c) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {
    public static int getYear(Calendar c) {
        if (c != null) {
            return c.get(Calendar.YEAR);
        } else {/* ww  w  . ja  v a  2  s.  com*/
            return Calendar.getInstance().get(Calendar.YEAR);
        }
    }
}

Related

  1. getTimeByStr(String str)
  2. getTimeMillis()
  3. getWeek(final Calendar calendar)
  4. getWeek(final Long date)
  5. getYear()
  6. extractDateFromCalendarTime(Calendar time)
  7. extractTimeFromCalendarTime(Calendar time)
  8. getCurrentCalendar()
  9. getCurrentDateByOffset(String format, int calendarField, int offset)