|
From: <pe...@us...> - 2003-09-22 19:24:13
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/time
In directory sc8-pr-cvs1:/tmp/cvs-serv4908/src/java/org/neuclear/time
Modified Files:
TimeTools.java
Log Message:
More fixes throughout to problems caused by renaming.
Index: TimeTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/time/TimeTools.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** TimeTools.java 19 Sep 2003 14:41:15 -0000 1.1.1.1
--- TimeTools.java 22 Sep 2003 19:24:02 -0000 1.2
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/09/22 19:24:02 pelle
+ * More fixes throughout to problems caused by renaming.
+ *
* Revision 1.1.1.1 2003/09/19 14:41:15 pelle
* First import into the neuclear project. This was originally under the SF neudist
***************
*** 30,34 ****
*/
package org.neuclear.time;
! import org.neuclear.utils.NeudistException;
import java.sql.Timestamp;
--- 33,38 ----
*/
package org.neuclear.time;
!
! import org.neudist.utils.NeudistException;
import java.sql.Timestamp;
***************
*** 48,53 ****
! public static java.util.Date addDaysToDate(java.util.Date d, int iDays)
! {
//create Calendar
Calendar cal = Calendar.getInstance();
--- 52,56 ----
! public static java.util.Date addDaysToDate(java.util.Date d, int iDays) {
//create Calendar
Calendar cal = Calendar.getInstance();
***************
*** 61,66 ****
}
! public static java.util.Date addMonthsToDate(java.util.Date d, int iMonths)
! {
//create Calendar
Calendar cal = Calendar.getInstance();
--- 64,68 ----
}
! public static java.util.Date addMonthsToDate(java.util.Date d, int iMonths) {
//create Calendar
Calendar cal = Calendar.getInstance();
***************
*** 80,88 ****
public static Timestamp convertDateToTimestamp(Date date) {
if (date instanceof Timestamp)
! return (Timestamp)date;
return new Timestamp(date.getTime());
}
! public static Timestamp parseTimeStamp(String ts) throws NeudistException{
try {
return convertDateToTimestamp(getDateFormatter().parse(ts));
--- 82,90 ----
public static Timestamp convertDateToTimestamp(Date date) {
if (date instanceof Timestamp)
! return (Timestamp) date;
return new Timestamp(date.getTime());
}
! public static Timestamp parseTimeStamp(String ts) throws NeudistException {
try {
return convertDateToTimestamp(getDateFormatter().parse(ts));
***************
*** 106,110 ****
*/
private static final String ISO_EXPANDED_DATE_TIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss,SSSzzz";
! private static final SimpleDateFormat DF=new SimpleDateFormat(ISO_EXPANDED_DATE_TIME_FORMAT);
{
DF.setTimeZone(TimeZone.getTimeZone("GMT"));
--- 108,113 ----
*/
private static final String ISO_EXPANDED_DATE_TIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss,SSSzzz";
! private static final SimpleDateFormat DF = new SimpleDateFormat(ISO_EXPANDED_DATE_TIME_FORMAT);
!
{
DF.setTimeZone(TimeZone.getTimeZone("GMT"));
|