public class DateTimeExtensions extends Object
Constructor and Description |
---|
DateTimeExtensions() |
Modifier and Type | Method and Description |
---|---|
static int |
getHourOfYear(Calendar dateTime)
Gets an integer representing the current hour from the time the year within the provided
Calendar instance started. |
static int |
getMinuteOfYear(Calendar dateTime)
Gets an integer representing the current minute from the time the year within the provided
Calendar instance started. |
static int |
getQuarterOfYear(Calendar dateTime)
Gets the quarter component of the date represented by the DATE instance.
|
static int |
getSecondOfYear(Calendar dateTime)
Gets an integer representing the current second from the time the year within the provided
Calendar instance started. |
static TimeSpan |
subtract(Calendar value,
Calendar value2)
Subtracts two
Calendar values. |
public static TimeSpan subtract(Calendar value, Calendar value2)
Calendar
values.value
- the first value to subtract from.value2
- the second value to subtract.TimeSpan
class representing the difference.public static int getQuarterOfYear(Calendar dateTime)
public static int getHourOfYear(Calendar dateTime)
Calendar
instance started.dateTime
- the Calendar
value representing the year to get the hour from.public static int getMinuteOfYear(Calendar dateTime)
Calendar
instance started.dateTime
- the Calendar
value representing the year to get the minute from.