|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfedora.server.utilities.DateUtility
Title: DateUtility.java
Description: A collection of utility methods for performing
frequently require tasks.
-----------------------------------------------------------------------------License and Copyright: The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/.
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The entire file consists of original code. Copyright © 2002-2005 by The Rector and Visitors of the University of Virginia and Cornell University. All rights reserved.
-----------------------------------------------------------------------------
| Constructor Summary | |
DateUtility()
|
|
| Method Summary | |
static java.lang.String |
convertDateToString(java.util.Date date)
Converts an instance of java.util.Date into a String using the date format: yyyy-MM-ddTHH:mm:ss.SSSZ. |
static java.util.Date |
convertLocalDateToUTCDate(java.util.Date localDate)
|
static java.util.Date |
convertStringToDate(java.lang.String dateTime)
Converts a datetime string into and instance of java.util.Date using the date format: yyyy-MM-ddTHH:mm:ss.SSSZ. |
static void |
main(java.lang.String[] args)
|
static java.util.Date |
parseDate(java.lang.String str)
Attempt to parse the given string of form: yyyy-MM-dd[THH:mm:ss[.SSS][Z]] as a Date. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DateUtility()
| Method Detail |
public static java.util.Date convertStringToDate(java.lang.String dateTime)
Converts a datetime string into and instance of java.util.Date using the date format: yyyy-MM-ddTHH:mm:ss.SSSZ.
Follows Postel's Law (lenient about what it accepts, as long as it's sensible)
dateTime - A datetime string
public static java.lang.String convertDateToString(java.util.Date date)
Converts an instance of java.util.Date into a String using the date format: yyyy-MM-ddTHH:mm:ss.SSSZ.
date - Instance of java.util.Date.
public static java.util.Date convertLocalDateToUTCDate(java.util.Date localDate)
public static java.util.Date parseDate(java.lang.String str)
str - the date string to parse
public static void main(java.lang.String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||