get Last Time from the Month in android Time class - Android java.util

Android examples for java.util:Month

Description

get Last Time from the Month in android Time class

Demo Code


//package com.java2s;
import android.text.format.Time;

public class Main {
    public static Time getLastTime(Time time) {
        time.monthDay = time.getActualMaximum(Time.MONTH_DAY);
        time.normalize(true);//ww  w. j  a v a 2  s.  co m
        return time;
    }
}

Related Tutorials