| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.archiviststoolkit.util.ATDateUtils
public class ATDateUtils
Archivists' Toolkit(TM) Copyright 2005-2007 Regents of the University of California, New York University, & Five Colleges, Inc. All rights reserved. This software is free. You can redistribute it and / or modify it under the terms of the Educational Community License (ECL) version 1.0 (http://www.opensource.org/licenses/ecl1.php) This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ECL license for more details about permissions and limitations. Archivists' Toolkit(TM) http://www.archiviststoolkit.org info@archiviststoolkit.org Simple utility class for checking that an entered date is valid for the given database and for handeling iso dates in the AT Created by IntelliJ IDEA. User: Nathan Stevens Date: Aug 28, 2008 Time: 10:46:58 AM To change this template use File | Settings | File Templates.
| Field Summary | |
|---|---|
| static long | MICROSOFT_SQL_SERVER_MINDATE | 
| static long | MYSQL_MINDATE | 
| Constructor Summary | |
|---|---|
| ATDateUtils() | |
| Method Summary | |
|---|---|
| static java.lang.String | formatISODate(java.lang.String date)Method to format an inputed date to the iso format of either yyyy, yyyy-mm, or yyyy-mm-dd | 
| static java.lang.Long | getISODateInSeconds(java.lang.String isoDate)Method to get an iso date in the format yyyy, yyyy-mm, or yyyy-mm-dd in GMT seconds | 
| static java.lang.Integer | getYearFromISODate(java.lang.String isoDate)Method to return the year part from an iso date in either yyyy, yyyy-mm, or yyyy-mm-dd | 
| static boolean | isValidATDate(javax.swing.JTextField textField)Method to check to see if the text in the textfield is a valid date. | 
| static void | isValidDatabaseDate(javax.swing.JFormattedTextField textField)Method to check to see if a textField as a date that can be | 
| static boolean | isValidISODate(javax.swing.JTextField textField)Method to check to see if the string that was passed in is a valid iso date. | 
| static java.lang.String | padMonthOrDay(java.lang.String mod)Pad the month or day with a leading zero | 
| static java.lang.String | padYear(java.lang.String year)Method to pad the given year with leading zero | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final long MYSQL_MINDATE
public static final long MICROSOFT_SQL_SERVER_MINDATE
| Constructor Detail | 
|---|
public ATDateUtils()
| Method Detail | 
|---|
public static void isValidDatabaseDate(javax.swing.JFormattedTextField textField)
textField - public static boolean isValidATDate(javax.swing.JTextField textField)
textField - The text fieldpublic static boolean isValidISODate(javax.swing.JTextField textField)
textField - The textfield containing the iso date to check
public static java.lang.String formatISODate(java.lang.String date)
date - The input date to format
public static java.lang.String padYear(java.lang.String year)
year - The year that is pasted in
public static java.lang.String padMonthOrDay(java.lang.String mod)
mod - The month or day to pad
public static java.lang.Integer getYearFromISODate(java.lang.String isoDate)
isoDate - 
public static java.lang.Long getISODateInSeconds(java.lang.String isoDate)
isoDate - The isodate to convert to seconds
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||