Java Calendar Year getLastYear(Calendar cal)

Here you can find the source of getLastYear(Calendar cal)

Description

get Last Year

License

Apache License

Declaration

public static String getLastYear(Calendar cal) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Calendar;

public class Main {

    public static String getLastYear(Calendar cal) {
        // int curYear;
        cal.add(Calendar.YEAR, -1);
        return "" + cal.get(Calendar.YEAR);
    }// w ww. j  a v  a2s  .com
}

Related

  1. copyYearMonthDay(Calendar destCal, Calendar sourceCal)
  2. createAndValidateCalendar(int month, int day, int year)
  3. getDecimalYear(Calendar calendar)
  4. getFiscalYear(Calendar calendar)
  5. getIntYear(Calendar c)
  6. getStartOfWeekCalendar(final int year, final int weekOfYear, final Locale locale)
  7. getValidCalendar(int year, int month, int day)
  8. getWeekOfYear(Calendar currentDate)
  9. getWeekOfYear(int startDay, Calendar dt)