public final class DateUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.Calendar |
calThen(long time)
Returns calendar for time
|
static java.util.Date |
forCalendarDiff(int field,
int amount)
Get date for calendar difference from current date
|
static boolean |
isTimePassedSince(long diff,
long timestamp)
Checks if the difference between current moment and timestamp is greater than diff
|
static java.util.Date |
now()
Get date for now
|
static java.lang.Long |
timestamp()
Get current timestamp
|
static java.lang.Long |
timestamp(java.util.Date date)
Get timestamp for a date
|
public static java.lang.Long timestamp(java.util.Date date)
date - datepublic static java.lang.Long timestamp()
public static java.util.Date forCalendarDiff(int field,
int amount)
field - difference field (Calendar.DATE, Calendar.MINUTE ... etc)amount - how much?public static java.util.Date now()
public static boolean isTimePassedSince(long diff,
long timestamp)
public static java.util.Calendar calThen(long time)
Copyright © 2014 Yandex. All Rights Reserved.