Java Day From explDay(Date date)

Here you can find the source of explDay(Date date)

Description

expl Day

License

Open Source License

Declaration

public static Date explDay(Date date) 

Method Source Code

//package com.java2s;
/** /*from w w w  .  j  a  v  a2s . c o  m*/
 *  Midnight Mars Browser - http://midnightmarsbrowser.blogspot.com
 *  Copyright (c) 2005 by Michael R. Howard
 *
 *  Midnight Mars Browser is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 * 
 *  Midnight Mars Browser is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Midnight Mars Browser; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 * 
 */

import java.util.*;

public class Main {
    private static Calendar explCalendar = new GregorianCalendar(
            TimeZone.getTimeZone("PST"), Locale.US);

    public static Date explDay(Date date) {
        explCalendar.setTime(date);
        explCalendar.set(Calendar.HOUR_OF_DAY, 0);
        explCalendar.set(Calendar.MINUTE, 0);
        explCalendar.set(Calendar.SECOND, 0);
        explCalendar.set(Calendar.MILLISECOND, 0);
        return explCalendar.getTime();
    }
}

Related

  1. daysOfTwo(Date date1, Date date2)
  2. daysSince(Date since)
  3. dayStartTime(int day)
  4. distanceToNowInDaysIgnoreTime(Date date)
  5. equalsDay(final Date date1, final Date date2)
  6. firstDayOfCentury(final int century)
  7. get23HourOfDay(Date date)
  8. getAge(Date birthDay)
  9. getBeforeDate_(Date date, int day)