Java Month Next nextMonthStart(Date period)

Here you can find the source of nextMonthStart(Date period)

Description

next Month Start

License

Apache License

Declaration

public static Date nextMonthStart(Date period) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.Calendar;
import java.util.Date;

public class Main {
    public static Date nextMonthStart(Date period) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(period);/*  w w w  .j a  v a2 s  .  c  om*/
        cal.add(Calendar.MONTH, 1);
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);

        return cal.getTime();
    }
}

Related

  1. nextMonth(Date date)
  2. nextMonth(Date date, int month)
  3. nextMonth(Date then)
  4. nextMonth(final Date date)
  5. nextMonthDateTime(Date date, int month)