|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectnet.objectlab.kit.datecalc.common.ExcelDateUtil
public final class ExcelDateUtil
Convert Excel Date to Jdk Date or Calendar.
| Method Summary | |
|---|---|
static Calendar |
getJavaCalendar(double excelDate,
boolean use1904windowing)
Given an Excel date with either 1900 or 1904 date windowing, converts it to a java.util.Date. |
static Date |
getJavaDate(double excelDate,
boolean use1904windowing)
Given an Excel date with either 1900 or 1904 date windowing, converts it to a java.util.Date. |
static Date |
getJavaDateOnly(double excelDate,
boolean use1904windowing)
Given an Excel date with either 1900 or 1904 date windowing, converts it to a java.util.Date. |
static boolean |
isValidExcelDate(double excelDate)
Given a double, checks if it is a valid Excel date. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Calendar getJavaCalendar(double excelDate,
boolean use1904windowing)
excelDate - The Excel date.use1904windowing - true if date uses 1904 windowing, or false if using 1900 date
windowing.
TimeZone
public static Date getJavaDateOnly(double excelDate,
boolean use1904windowing)
excelDate - The Excel date.use1904windowing - true if date uses 1904 windowing, or false if using 1900 date
windowing.
TimeZone
public static Date getJavaDate(double excelDate,
boolean use1904windowing)
TimeZone in Java uses Daylight Saving
Time then the conversion back to an Excel date may not give the same
value, that is the comparison excelDate ==
getExcelDate(getJavaDate(excelDate,false)) is not always true.
For example if default timezone is Europe/Copenhagen, on
2004-03-28 the minute after 01:59 CET is 03:00 CEST, if the excel date
represents a time between 02:00 and 03:00 then it is converted to past
03:00 summer time
excelDate - The Excel date.use1904windowing - true if date uses 1904 windowing, or false if using 1900 date
windowing.
TimeZonepublic static boolean isValidExcelDate(double excelDate)
excelDate - the double value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||