Here you can find the source of getDayOfMonth(long time)
public static int getDayOfMonth(long time)
//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 ticksInDay = 24000; public static int getDayOfMonth(long time) { return getDayOfYear(time) - getMonthOfYear(time) * daysInMonth; }/*from www.j av a 2 s. co m*/ public static int getDayOfYear(long time) { return (int) (getTotalDays(time) % daysInYear); } public static int getMonthOfYear(long time) { return (int) (getTotalMonths(time) % monthsInYear); } public static long getTotalDays(long time) { return time / ticksInDay; } public static long getTotalMonths(long time) { return time / daysInMonth; } }