public class DateService extends Object
| Constructor and Description |
|---|
DateService() |
| Modifier and Type | Method and Description |
|---|---|
int |
getAge(org.joda.time.DateTime birthDate)
Calculate the age.
|
boolean |
isPast(org.joda.time.DateTime date)
Check if a date lies in the past.
|
boolean |
isSameDay(org.joda.time.DateTime date1,
org.joda.time.DateTime date2)
Check if two dates represent the same day
|
boolean |
isToday(org.joda.time.DateTime date)
Check if the date is today.
|
@Autowired private Date date
public boolean isSameDay(org.joda.time.DateTime date1,
org.joda.time.DateTime date2)
date1 - date2 - public boolean isToday(org.joda.time.DateTime date)
date - public boolean isPast(org.joda.time.DateTime date)
date - to be checked.public int getAge(org.joda.time.DateTime birthDate)
birthDate - Copyright © 2011-2017 Sahits GmbH. All Rights Reserved.