public static int ticksToDate(long ticks)
    {
        int year = ticksToYears(ticks);
        int month = ticksToMonths(ticks);

        long dayOffset = ticks;
        dayOffset -= millisToYearStart(year);
        dayOffset -=
            isLeapYear(year) ? ((long) LEAP_DAYS_IN_YEAR_PRIOR_TO_MONTH[month - 1] * MILLIS_PER_DAY)
                             : ((long) USUAL_DAYS_IN_YEAR_PRIOR_TO_MONTH[month - 1] * MILLIS_PER_DAY);

        return (int) (dayOffset / MILLIS_PER_DAY) + 1;
    }
public static int ticksToDate(long ticks)
    {
        int year = ticksToYears(ticks);
        int month = ticksToMonths(ticks);

        long dayOffset = ticks;
        dayOffset -= millisToYearStart(year);
        dayOffset -=
            isLeapYear(year) ? ((long) LEAP_DAYS_IN_YEAR_PRIOR_TO_MONTH[month - 1] * MILLIS_PER_DAY)
                             : ((long) USUAL_DAYS_IN_YEAR_PRIOR_TO_MONTH[month - 1] * MILLIS_PER_DAY);

        return (int) (dayOffset / MILLIS_PER_DAY) + 1;
    }
public static int ticksToDate ( long ticks ) { int year = ticksToYears ( ticks ) ; int month = ticksToMonths ( ticks ) ; long dayOffset = ticks ; dayOffset -= millisToYearStart ( year ) ; dayOffset -= isLeapYear ( year ) ? ( ( long ) LEAP_DAYS_IN_YEAR_PRIOR_TO_MONTH [ month - 1 ] * MILLIS_PER_DAY ) : ( ( long ) USUAL_DAYS_IN_YEAR_PRIOR_TO_MONTH [ month - 1 ] * MILLIS_PER_DAY ) ; return ( int ) ( dayOffset / MILLIS_PER_DAY ) + 1 ; }
Extracts the date (day in month) component of a time in millisecond ticks.

@param  ticks The time in ticks.

@return The date (day in month) component of the time.
Extracts the date ( day in month ) component of a time in millisecond ticks .