Zaokrągla przekazaną datę do pełnego dnia.

@param date Data do zaokrąglenia.
@return Obiekt {@link Timestamp} reprezentujący zaokrągloną datę.
175494
public static Date getDayDate(Date date) {
		Calendar calendar = getCalendar();
		calendar.setTime(date);
		return getDayDate(calendar);
	}
1134744
public static java.sql.Date getSqlDate(java.util.Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        return new java.sql.Date(cal.getTimeInMillis());
    }
76258
public static int getDay(final Date date)
	{
		final Calendar calendar = Calendar.getInstance();
		calendar.setTime(date);
		return calendar.get(Calendar.DAY_OF_MONTH);
	}
76614
public static Date getLastDayOfMonth(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        int firstDay = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
        return org.apache.commons.lang.time.DateUtils.setDays(date, firstDay);
    }
767805
function(date) {
        var dateNoTime = new Date(
            date.getFullYear(), date.getMonth(), date.getDate());
        return Math.ceil(
            (dateNoTime - new Date(date.getFullYear(), 0, 1))
            / dateutil.ONE_DAY) + 1;
    }
449975
public static Date nextDate(@NotNull final Date date) {
		return DateUtils.ceiling(date, Calendar.DATE);
	}
1357796
public static final synchronized Date parseDate(String date) {
		try {
			return dateFormat.parse(date);
		} catch(ParseException e) {
			throw new RuntimeException(e);
		}
	}
102185
public static String format(Date date) {
    Calendar calendar = new GregorianCalendar(TIMEZONE_Z, Locale.US);
    calendar.setTime(date);

    // estimate capacity of buffer as close as we can (yeah, that's pedantic ;)
    int capacity = "yyyy-MM-ddThh:mm:ss.sssZ".length();
    StringBuilder formatted = new StringBuilder(capacity);
    padInt(formatted, calendar.get(Calendar.YEAR), "yyyy".length());
    formatted.append('-');
    padInt(formatted, calendar.get(Calendar.MONTH) + 1, "MM".length());
    formatted.append('-');
    padInt(formatted, calendar.get(Calendar.DAY_OF_MONTH), "dd".length());
    formatted.append('T');
    padInt(formatted, calendar.get(Calendar.HOUR_OF_DAY), "hh".length());
    formatted.append(':');
    padInt(formatted, calendar.get(Calendar.MINUTE), "mm".length());
    formatted.append(':');
    padInt(formatted, calendar.get(Calendar.SECOND), "ss".length());
    formatted.append('.');
    padInt(formatted, calendar.get(Calendar.MILLISECOND), "sss".length());
    formatted.append('Z');
    return formatted.toString();
  }
1257104
public static String dateTime(Date date) {
		GregorianCalendar gc = new GregorianCalendar();
		gc.setTime(date);
		return dateTime(gc);
	}
1304461
public static Dater of(Date date, DateStyle dateStyle) {
		return of(date).with(dateStyle);
	}
128255
public static boolean isDateInThePast(final Date date)
	{
		boolean inPast = false;
		final Calendar compare = Calendar.getInstance();
		compare.setTime(date);
		final Calendar now = Calendar.getInstance();
		now.setTime(new Date(System.currentTimeMillis()));
		inPast = now.after(compare);
		return inPast;
	}
1241476
public static String format(Date date) {
        DateFormat dateFormat = new SimpleDateFormat(DateField.FORMAT);
        return date == null ? null : dateFormat.format(date);
    }
511106
public static int getSecond(Date date) {
        Calendar c = Calendar.getInstance();
        c.setTime(date);
        return c.get(Calendar.SECOND);
    }
102759
public static Date dateReservedDay000(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        return dateReservedDay000(calendar);
    }
638206
public String format(Date date) {
		Calendar cal = new GregorianCalendar();
		cal.setTime(date);
		return DatatypeConverter.printDateTime(cal);
	}
808878
public static Date getDateByPattern(String date)
    {
        if (StringUtils.isNumeric(date))
        {
            return new Date(Long.parseLong(date));
        }

        for (String p : patterns)
        {
            try
            {
                DateFormat formatter = new SimpleDateFormat(p);
                Date dt = formatter.parse(date);
                return dt;
            }
            catch (IllegalArgumentException iae)
            {
                // Do nothing.
                // move to next pattern.
            }
            catch (ParseException e)
            {
                // Do nothing.
                // move to next pattern.
            }

        }
        log.error("Required Date format is not supported!" + date);
        throw new PropertyAccessException("Required Date format is not supported!" + date);
    }
432627
public static DateValue toDateValue(DateValue date) {
		return (date instanceof TimeValue) ? new DateValueImpl(date.year(), date.month(), date.day()) : date;
	}