| org.kuali.core.service.DateTimeService
All known Subclasses: org.kuali.core.service.impl.DateTimeServiceImpl,
DateTimeService | public interface DateTimeService (Code) | | This interface defines methods that a DateTime service must provide
|
convertToDate | public Date convertToDate(String dateString) throws ParseException(Code) | | Translates the specified string into a date without a time component, formatted according to "stringDateFormat" that the
service is configured with
Parameters: dateString - the date representation of the specified dateString throws: ParseException - |
convertToDateTime | public Date convertToDateTime(String dateTimeString) throws ParseException(Code) | | Translates the specified string into a date with a time component, formatted according to "stringDateTimeFormat" that the
service is configured with
Parameters: dateTimeString - the date representation of the specified dateTimeString throws: ParseException - |
convertToSqlTimestamp | public java.sql.Timestamp convertToSqlTimestamp(String timeString) throws ParseException(Code) | | Converts the given String into a java.sql.Timestamp instance according to the "stringDateTimeFormat" that the service is
configured with
Parameters: timeString - java.sql.Timestamp throws: IllegalArgumentException - if the given string is null or blank throws: ParseException - if the string cannot be converted |
dateDiff | public int dateDiff(Date date1, Date date2, boolean inclusive)(Code) | | Returns the number of days between two days - start and end date of some arbitrary period.
Parameters: date1 - The first date in the period Parameters: date2 - The second date in the period Parameters: inclusive - Whether the result should include both the start and the end date. Otherwise it only includes one. int The number of days in the period |
getCurrentCalendar | public Calendar getCurrentCalendar()(Code) | | Returns a Calendar initialized with the current Date
currennt Calendar |
getCurrentDate | public Date getCurrentDate()(Code) | | Returns the current date/time as a java.util.Date
current date/time |
getCurrentSqlDate | public java.sql.Date getCurrentSqlDate()(Code) | | Returns the current date/time as a java.sql.Date
current date/time |
getCurrentSqlDateMidnight | public java.sql.Date getCurrentSqlDateMidnight()(Code) | | Returns the current date as a java.sql.Date rounded back to midnight. This is what the JDBC driver is supposed to do with
dates on their way to the database, so it can be convenient for comparing to dates from the database or input from the UI.
current date at the most recent midnight in the JVM's timezone |
getCurrentTimestamp | public Timestamp getCurrentTimestamp()(Code) | | Returns the current date/time as a java.sql.Timestamp
current date/time |
toDateString | public String toDateString(Date date)(Code) | | Translates the specified date into a string without a time component, formatted according to "stringDateFormat" that the
service is configured with
Parameters: date - formatted string version of the specified date |
toDateTimeString | public String toDateTimeString(Date date)(Code) | | Translates the specified date into a string with a time component, formatted according to the "stringDateTimeFormat" that the
service is configured with
Parameters: date - formatted string version of the specified date |
toString | public String toString(Date date, String pattern)(Code) | | Translates the specified date into a string without a time component, formatted according to the specified pattern
Parameters: date - formatted string version of the specified date |
|
|