public class DateTimeService extends Object
| Constructor and Description |
|---|
DateTimeService() |
| Modifier and Type | Method and Description |
|---|---|
org.joda.time.DateTime |
current24HourTimeSlice()
The 24 hour time slices are fix - 00:00 to 24:00.
|
org.joda.time.DateTime |
currentHour() |
org.joda.time.DateTime |
get24HourTimeSlice(org.joda.time.DateTime time)
This method determines the 24 hour time slice for the specified time and returns the start of that time slice.
|
org.joda.time.DateTime |
getTimeSlice(org.joda.time.DateTime dt,
org.joda.time.Duration duration) |
public org.joda.time.DateTime currentHour()
public org.joda.time.DateTime current24HourTimeSlice()
currentHour() and returns the start of the time slice.public org.joda.time.DateTime get24HourTimeSlice(org.joda.time.DateTime time)
time - The DateTime to be rounded downcurrent24HourTimeSlice()public org.joda.time.DateTime getTimeSlice(org.joda.time.DateTime dt,
org.joda.time.Duration duration)
Copyright © 2014–2015 Red Hat, Inc.. All rights reserved.