Java Year From toNowYear(Date date)

Here you can find the source of toNowYear(Date date)

Description

to Now Year

License

Apache License

Declaration

public static String toNowYear(Date date) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String toNowYear(Date date) {
        String strDate = "";
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy");
        strDate = dateFormat.format(date);
        return strDate;
    }/*  ww  w .  j a va  2 s .  co  m*/
}

Related

  1. getYearStart(int year)
  2. getYearStart(long ts)
  3. getYearStartTime()
  4. isInYear(String dateStr, int year)
  5. setYears(Date date, int amount)
  6. toShortW3CDTF(Date d, boolean yearOnly)
  7. year()
  8. year(Date date)
  9. year(long time)