| java.lang.Object org.ofbiz.base.util.UtilDateTime
UtilDateTime | public class UtilDateTime (Code) | | Utility class for handling java.util.Date, the java.sql data/time classes and related
author: David E. Jones author: Andy Zeneski author: Johan Isacsson version: $Revision: 1.1 $ since: 2.0 |
Method Summary | |
public static java.sql.Timestamp | getDayEnd(java.sql.Timestamp stamp) | public static java.sql.Timestamp | getDayEnd(java.sql.Timestamp stamp, int daysLater) | public static java.sql.Timestamp | getDayStart(java.sql.Timestamp stamp) | public static java.sql.Timestamp | getDayStart(java.sql.Timestamp stamp, int daysLater) | public static java.sql.Timestamp | getMonthStart(java.sql.Timestamp stamp) | public static java.sql.Timestamp | getMonthStart(java.sql.Timestamp stamp, int daysLater) | public static java.sql.Timestamp | getNextDayStart(java.sql.Timestamp stamp) | public static java.sql.Timestamp | getWeekStart(java.sql.Timestamp stamp) | public static java.sql.Timestamp | getWeekStart(java.sql.Timestamp stamp, int daysLater) | public static java.sql.Timestamp | monthBegin() | public static java.util.Date | nowDate() | public static String | nowDateString() | public static java.sql.Timestamp | nowTimestamp() | public static java.util.Date | toDate(String dateTime) | public static java.util.Date | toDate(String date, String time) | public static java.util.Date | toDate(String monthStr, String dayStr, String yearStr, String hourStr, String minuteStr, String secondStr) Makes a Date from separate Strings for month, day, year, hour, minute, and second. | public static java.util.Date | toDate(int month, int day, int year, int hour, int minute, int second) Makes a Date from separate ints for month, day, year, hour, minute, and second. | public static String | toDateString(java.util.Date date) | public static String | toDateTimeString(java.util.Date date) Makes a combined data and time string in the format "MM/DD/YYYY HH:MM:SS" from a Date. | public static java.sql.Date | toSqlDate(String date) | public static java.sql.Date | toSqlDate(String monthStr, String dayStr, String yearStr) | public static java.sql.Date | toSqlDate(int month, int day, int year) | public static java.sql.Time | toSqlTime(String time) | public static java.sql.Time | toSqlTime(String hourStr, String minuteStr, String secondStr) Makes a java.sql.Time from separate Strings for hour, minute, and second. | public static java.sql.Time | toSqlTime(int hour, int minute, int second) Makes a java.sql.Time from separate ints for hour, minute, and second. | public static String | toTimeString(java.util.Date date) Makes a time String in the format HH:MM:SS from a Date. | public static String | toTimeString(int hour, int minute, int second) Makes a time String in the format HH:MM:SS from a separate ints for hour, minute, and second. | public static java.sql.Timestamp | toTimestamp(String dateTime) | public static java.sql.Timestamp | toTimestamp(String date, String time) | public static java.sql.Timestamp | toTimestamp(String monthStr, String dayStr, String yearStr, String hourStr, String minuteStr, String secondStr) Makes a Timestamp from separate Strings for month, day, year, hour, minute, and second. | public static java.sql.Timestamp | toTimestamp(int month, int day, int year, int hour, int minute, int second) Makes a Timestamp from separate ints for month, day, year, hour, minute, and second. |
monthBegin | public static java.sql.Timestamp monthBegin()(Code) | | Makes a Timestamp for the beginning of the month
A Timestamp of the beginning of the month |
nowDateString | public static String nowDateString()(Code) | | Return a string formatted as yyyyMMddHHmmss
String formatted for right now |
nowTimestamp | public static java.sql.Timestamp nowTimestamp()(Code) | | Return a Timestamp for right now
Timestamp for right now |
toDate | public static java.util.Date toDate(String dateTime)(Code) | | Converts a date and time String into a Date
Parameters: dateTime - A combined data and time string in the format "MM/DD/YYYY HH:MM:SS", the seconds are optional The corresponding Date |
toDate | public static java.util.Date toDate(String date, String time)(Code) | | Converts a date String and a time String into a Date
Parameters: date - The date String: MM/DD/YYYY Parameters: time - The time String: either HH:MM or HH:MM:SS A Date made from the date and time Strings |
toDate | public static java.util.Date toDate(String monthStr, String dayStr, String yearStr, String hourStr, String minuteStr, String secondStr)(Code) | | Makes a Date from separate Strings for month, day, year, hour, minute, and second.
Parameters: monthStr - The month String Parameters: dayStr - The day String Parameters: yearStr - The year String Parameters: hourStr - The hour String Parameters: minuteStr - The minute String Parameters: secondStr - The second String A Date made from separate Strings for month, day, year, hour, minute, and second. |
toDate | public static java.util.Date toDate(int month, int day, int year, int hour, int minute, int second)(Code) | | Makes a Date from separate ints for month, day, year, hour, minute, and second.
Parameters: month - The month int Parameters: day - The day int Parameters: year - The year int Parameters: hour - The hour int Parameters: minute - The minute int Parameters: second - The second int A Date made from separate ints for month, day, year, hour, minute, and second. |
toDateString | public static String toDateString(java.util.Date date)(Code) | | Makes a date String in the format MM/DD/YYYY from a Date
Parameters: date - The Date A date String in the format MM/DD/YYYY |
toDateTimeString | public static String toDateTimeString(java.util.Date date)(Code) | | Makes a combined data and time string in the format "MM/DD/YYYY HH:MM:SS" from a Date. If the seconds are 0 they are left off.
Parameters: date - The Date A combined data and time string in the format "MM/DD/YYYY HH:MM:SS" where the seconds are left off if they are 0. |
toSqlDate | public static java.sql.Date toSqlDate(String date)(Code) | | Converts a date String into a java.sql.Date
Parameters: date - The date String: MM/DD/YYYY A java.sql.Date made from the date String |
toSqlDate | public static java.sql.Date toSqlDate(String monthStr, String dayStr, String yearStr)(Code) | | Makes a java.sql.Date from separate Strings for month, day, year
Parameters: monthStr - The month String Parameters: dayStr - The day String Parameters: yearStr - The year String A java.sql.Date made from separate Strings for month, day, year |
toSqlDate | public static java.sql.Date toSqlDate(int month, int day, int year)(Code) | | Makes a java.sql.Date from separate ints for month, day, year
Parameters: month - The month int Parameters: day - The day int Parameters: year - The year int A java.sql.Date made from separate ints for month, day, year |
toSqlTime | public static java.sql.Time toSqlTime(String time)(Code) | | Converts a time String into a java.sql.Time
Parameters: time - The time String: either HH:MM or HH:MM:SS A java.sql.Time made from the time String |
toSqlTime | public static java.sql.Time toSqlTime(String hourStr, String minuteStr, String secondStr)(Code) | | Makes a java.sql.Time from separate Strings for hour, minute, and second.
Parameters: hourStr - The hour String Parameters: minuteStr - The minute String Parameters: secondStr - The second String A java.sql.Time made from separate Strings for hour, minute, and second. |
toSqlTime | public static java.sql.Time toSqlTime(int hour, int minute, int second)(Code) | | Makes a java.sql.Time from separate ints for hour, minute, and second.
Parameters: hour - The hour int Parameters: minute - The minute int Parameters: second - The second int A java.sql.Time made from separate ints for hour, minute, and second. |
toTimeString | public static String toTimeString(java.util.Date date)(Code) | | Makes a time String in the format HH:MM:SS from a Date. If the seconds are 0, then the output is in HH:MM.
Parameters: date - The Date A time String in the format HH:MM:SS or HH:MM |
toTimeString | public static String toTimeString(int hour, int minute, int second)(Code) | | Makes a time String in the format HH:MM:SS from a separate ints for hour, minute, and second. If the seconds are 0, then the output is in HH:MM.
Parameters: hour - The hour int Parameters: minute - The minute int Parameters: second - The second int A time String in the format HH:MM:SS or HH:MM |
toTimestamp | public static java.sql.Timestamp toTimestamp(String dateTime)(Code) | | Converts a date and time String into a Timestamp
Parameters: dateTime - A combined data and time string in the format "MM/DD/YYYY HH:MM:SS", the seconds are optional The corresponding Timestamp |
toTimestamp | public static java.sql.Timestamp toTimestamp(String date, String time)(Code) | | Converts a date String and a time String into a Timestamp
Parameters: date - The date String: MM/DD/YYYY Parameters: time - The time String: either HH:MM or HH:MM:SS A Timestamp made from the date and time Strings |
toTimestamp | public static java.sql.Timestamp toTimestamp(String monthStr, String dayStr, String yearStr, String hourStr, String minuteStr, String secondStr)(Code) | | Makes a Timestamp from separate Strings for month, day, year, hour, minute, and second.
Parameters: monthStr - The month String Parameters: dayStr - The day String Parameters: yearStr - The year String Parameters: hourStr - The hour String Parameters: minuteStr - The minute String Parameters: secondStr - The second String A Timestamp made from separate Strings for month, day, year, hour, minute, and second. |
toTimestamp | public static java.sql.Timestamp toTimestamp(int month, int day, int year, int hour, int minute, int second)(Code) | | Makes a Timestamp from separate ints for month, day, year, hour, minute, and second.
Parameters: month - The month int Parameters: day - The day int Parameters: year - The year int Parameters: hour - The hour int Parameters: minute - The minute int Parameters: second - The second int A Timestamp made from separate ints for month, day, year, hour, minute, and second. |
|
|