public class IlrDateUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static int |
extractDayOfWeek(java.util.Date date)
Helper to get the day of week from a java.util.Date.
|
static int |
extractMonth(java.util.Date date)
Helper to get a month from a date object.
|
static int |
extractYear(java.util.Date date)
Helper to get the year from a date object.
|
static java.util.Date |
getDate(java.util.Date date)
Helper to get the Date fields (every fields but the time-related fields)
from a date object.
|
static java.util.Date |
getDateFromDayOfWeek(int dayOfWeek)
Helper to get a java.util.Date from a day of week value.
|
static java.util.Date |
getDateFromMonth(int month)
Helper to get a java.util.Date from a month value.
|
static java.util.Date |
getDateFromYear(int year)
Helper to get a java.util.Date from a year value.
|
static java.util.Date |
getDayOfWeek(java.util.Date date)
Helper to extract the day of week from date value, as a date.
|
static long |
getLocalTime(int year,
int month,
int date,
int hour,
int minute,
int second,
int millisecond) |
static long |
getLocalTime(int year,
int month,
int date,
int hour,
int minute,
int second,
int millisecond,
int am_pm)
Helper to get a time in milliseconds, expressed for the current time zone, from
year, month, date, hour, minute, seconds and milliseconds.
|
static java.util.Date |
getMonth(java.util.Date date)
Helper to extract the month from date value, as a date.
|
static java.util.Date |
getTime(java.util.Date date)
Helper to get the time fields from a date object.
|
static java.util.Date |
getYear(java.util.Date date)
Helper to extract the year from date value, as a date.
|
public static int extractDayOfWeek(java.util.Date date)
public static java.util.Date getDate(java.util.Date date)
public static java.util.Date getTime(java.util.Date date)
public static int extractYear(java.util.Date date)
public static int extractMonth(java.util.Date date)
public static java.util.Date getDateFromYear(int year)
public static java.util.Date getDateFromMonth(int month)
public static java.util.Date getDateFromDayOfWeek(int dayOfWeek)
public static java.util.Date getYear(java.util.Date date)
date - the date containing the desired year valuepublic static java.util.Date getDayOfWeek(java.util.Date date)
date - the date containing the desired day of week valuepublic static java.util.Date getMonth(java.util.Date date)
date - the date containing the desired month valuepublic static long getLocalTime(int year,
int month,
int date,
int hour,
int minute,
int second,
int millisecond,
int am_pm)
year - The value used to set the YEAR time field in the calendar.month - The value used to set the MONTH time field in the calendar. Month value is 0-based. e.g., 0 for January.date - The value used to set the DATE time field in the calendar.hour - The value used to set the HOUR_OF_DAY time field in the calendar.minute - The value used to set the MINUTE time field in the calendar.second - The value used to set the SECOND time field in the calendar.millisecond - The value used to set the MILLISECOND time field in the calendar.am_pm - The value to used to set the AM_PM time field in the calendar.public static long getLocalTime(int year,
int month,
int date,
int hour,
int minute,
int second,
int millisecond)
© Copyright IBM Corp. 1987, 2017