Android Timestamp Get getLastOfMonth(Timestamp t1)

Here you can find the source of getLastOfMonth(Timestamp t1)

Description

get Last Of Month

Declaration

public static Timestamp getLastOfMonth(Timestamp t1) 

Method Source Code

//package com.java2s;

import java.sql.Timestamp;

import java.util.Calendar;

import java.util.GregorianCalendar;

public class Main {
    public static Timestamp getLastOfMonth(Timestamp t1) {
        Calendar a = new GregorianCalendar();
        a.setTime(t1);//from   ww  w. j  a  v a2  s . com
        a.set(Calendar.DATE, 1);
        a.roll(Calendar.DATE, -1);
        return new Timestamp(a.getTimeInMillis());
    }
}

Related

  1. getCurrentMonth(Timestamp t1)
  2. getCurrentWeek(Timestamp t1)
  3. getFirstOfMonth(Timestamp t1)
  4. getFirstOfYear(Timestamp t1)
  5. getFriendlyTimeStamp()
  6. getLastOfYear(Timestamp t1)
  7. getRelativeTimeofTweet(String timeStamp)
  8. getTimestamp(Timestamp timestamp, int day, int hour, int minute)
  9. getWeekOfYear(Calendar cal, Timestamp ts)