Java Date to Day getDayOfThisYear(Date currentdate)

Here you can find the source of getDayOfThisYear(Date currentdate)

Description

get Day Of This Year

License

Apache License

Declaration

public static int getDayOfThisYear(Date currentdate) 

Method Source Code

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

import java.util.Calendar;
import java.util.Date;

public class Main {

    public static int getDayOfThisYear(Date currentdate) {
        Calendar cal = Calendar.getInstance();
        if (currentdate != null) {
            cal.setTime(currentdate);/*from   w w  w  .j ava 2 s  . c o m*/
        } else {
            cal.setTime(new Date());
        }
        return cal.get(Calendar.DATE);
    }
}

Related

  1. getDayEnd(final Date date, TimeZone timezone)
  2. getDayFromDate(Date date)
  3. getDayMonthYear(Date aDate, boolean isAddSpace)
  4. getDayNumber(Date startDate, Date endDate)
  5. getDayOfDate(Date date)
  6. getDayOfYear(Date date)
  7. getDays(Date t, Date baseDate)
  8. getDaysEarlierDate(int days)
  9. getDayShort(Date date)