Java Calendar Time removeTime(Calendar calendar)

Here you can find the source of removeTime(Calendar calendar)

Description

remove Time

License

Open Source License

Declaration

public static Calendar removeTime(Calendar calendar) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;

public class Main {
    public static Calendar removeTime(Calendar calendar) {
        Calendar returnCalendar = (Calendar) calendar.clone();
        returnCalendar.set(Calendar.HOUR_OF_DAY, 0);
        returnCalendar.set(Calendar.MINUTE, 0);
        returnCalendar.set(Calendar.SECOND, 0);
        returnCalendar.set(Calendar.MILLISECOND, 0);
        return returnCalendar;
    }//w w  w .j ava2s  .com
}

Related

  1. normalizeLocalTime(final Calendar cal)
  2. parseTime(Calendar calendar, String time_string)
  3. parseTime(String time, Calendar calendar)
  4. removeTime(Calendar c)
  5. removeTime(Calendar cal)
  6. removeTime(final Calendar date)
  7. resetTime(Calendar cal)
  8. resetTime(Calendar cal)
  9. resetTime(GregorianCalendar cal)