Java Year From getYearNumberofdays(String date)

Here you can find the source of getYearNumberofdays(String date)

Description

get Year Numberofdays

License

Open Source License

Declaration

public static int getYearNumberofdays(String date) 

Method Source Code

//package com.java2s;

public class Main {

    public static int getYearNumberofdays(String date) {
        int year = Integer.parseInt(date.split("-")[0]);
        if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
            return 366;
        }//w w w  .  j a v  a2 s . c  o m
        return 365;
    }
}

Related

  1. getYearFromWeekCode(String weekCode)
  2. getYearFromYM(String ym)
  3. getYearMonth(String day)
  4. getYearMonthArray(Integer yearMonth)
  5. getYearMonthDays(int year, int month)
  6. getYearOfDayMark(int day)
  7. getYearOfPreYearWeek(int year, int week)
  8. getYearOfTime(Long time)
  9. getYears(Integer limit)