Java Calendar Year year(Calendar calendar)

Here you can find the source of year(Calendar calendar)

Description

year

License

Open Source License

Declaration

public static int year(Calendar calendar) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;

public class Main {
    public static int year(Calendar calendar) {
        return calendar.get(Calendar.YEAR);
    }/*from w ww  . ja  v  a 2 s  . co  m*/

    public static int year() {
        return Calendar.getInstance().get(Calendar.YEAR);
    }
}

Related

  1. setDate(Calendar cal, int year, int month, int day)
  2. toCalendar(int year, int month, int day, int hour, int minutes, int seconds)
  3. toStringYearMonth(Calendar calendar)
  4. truncCalendarToHalfYear(Calendar c)
  5. truncCalendarToYear(Calendar c)
  6. year(Calendar date)