Java Month of Year getMonthOfYear(long time)

Here you can find the source of getMonthOfYear(long time)

Description

get Month Of Year

License

Open Source License

Declaration

public static int getMonthOfYear(long time) 

Method Source Code

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

public class Main {
    public static int daysInMonth = 28, monthsInYear = 12, daysInYear = daysInMonth * monthsInYear;

    public static int getMonthOfYear(long time) {
        return (int) (getTotalMonths(time) % monthsInYear);
    }/*ww w  . java  2  s.c om*/

    public static long getTotalMonths(long time) {
        return time / daysInMonth;
    }
}

Related

  1. getMaxDayOfMonth(int year, int month)
  2. getMonth(int week, int year)
  3. getMonthDays(Object year, Object month)
  4. getMonthHaveDays(int year, int month)
  5. getMonthOfYear(int m)
  6. getMonthOfYearFromTimestamp(long ms)
  7. getMonthStart(int year, int month)
  8. getNextiMonth(Date date, int month)
  9. getNextMonth()