ASF Bugzilla – Attachment 20938 Details for
Bug 43551
[PATCH] Fixes bug when writing dates to excel files w/ 1904 date windowing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
invalid patch
1904.patch (text/plain), 23.74 KB, created by
Pavel Krupets
on 2007-10-06 16:51:19 UTC
(
hide
)
Description:
invalid patch
Filename:
MIME Type:
Creator:
Pavel Krupets
Created:
2007-10-06 16:51:19 UTC
Size:
23.74 KB
patch
obsolete
>Index: src/java/org/apache/poi/hssf/usermodel/HSSFDateUtil.java >=================================================================== >--- src/java/org/apache/poi/hssf/usermodel/HSSFDateUtil.java (revision 581034) >+++ src/java/org/apache/poi/hssf/usermodel/HSSFDateUtil.java (working copy) >@@ -35,6 +35,8 @@ > * @author Glen Stampoultzis (glens at apache.org) > * @author Dan Sherman (dsherman at isisph.com) > * @author Hack Kampbjorn (hak at 2mba.dk) >+ * @author Alex Jacoby (ajacoby at gmail.com) >+ * @author Pavel Krupets (pkrupets at palmtreebusiness dot com) > */ > > public class HSSFDateUtil >@@ -54,8 +56,8 @@ > * @return Excel representation of Date (-1 if error - test for error by checking for less than 0.1) > * @param date the Date > */ >- >- public static double getExcelDate(Date date) >+ >+ public static double getExcelDate(Date date, boolean use1904windowing) > { > Calendar calStart = new GregorianCalendar(); > >@@ -80,31 +82,16 @@ > ) * 1000 + calStart.get(Calendar.MILLISECOND) > ) / ( double ) DAY_MILLISECONDS; > calStart = dayStart(calStart); >- >- double value = fraction + absoluteDay(calStart); > >- if (value >= 60) { >+ double value = fraction + absoluteDay(calStart, use1904windowing); >+ >+ if (!use1904windowing && value >= 60) { > value += 1; > } > > return value; > } > } >- >- /** >- * Given a excel date, converts it into a Date. >- * Assumes 1900 date windowing. >- * >- * @param date the Excel Date >- * >- * @return Java representation of a date (null if error) >- * @see #getJavaDate(double,boolean) >- */ >- >- public static Date getJavaDate(double date) >- { >- return getJavaDate(date,false); >- } > > /** > * Given an Excel date with either 1900 or 1904 date windowing, >@@ -296,10 +283,10 @@ > * @exception IllegalArgumentException if date is invalid > */ > >- private static int absoluteDay(Calendar cal) >+ static int absoluteDay(Calendar cal, boolean use1904windowing) > { > return cal.get(Calendar.DAY_OF_YEAR) >- + daysInPriorYears(cal.get(Calendar.YEAR)); >+ + daysInPriorYears(cal.get(Calendar.YEAR), use1904windowing); > } > > /** >@@ -307,14 +294,14 @@ > * > * @return days number of days in years prior to yr. > * @param yr a year (1900 < yr < 4000) >+ * @param use1904windowing > * @exception IllegalArgumentException if year is outside of range. > */ > >- private static int daysInPriorYears(int yr) >+ private static int daysInPriorYears(int yr, boolean use1904windowing) > { >- if (yr < 1900) { >- throw new IllegalArgumentException( >- "'year' must be 1900 or greater"); >+ if ((!use1904windowing && yr < 1900) || (use1904windowing && yr < 1900)) { >+ throw new IllegalArgumentException("'year' must be 1900 or greater"); > } > > int yr1 = yr - 1; >@@ -323,7 +310,7 @@ > + yr1 / 400 // plus years divisible by 400 > - 460; // leap days in previous 1900 years > >- return 365 * (yr - 1900) + leapDays; >+ return 365 * (yr - (use1904windowing ? 1904 : 1900)) + leapDays; > } > > // set HH:MM:SS fields of cal to 00:00:00:000 >Index: src/java/org/apache/poi/hssf/usermodel/HSSFCell.java >=================================================================== >--- src/java/org/apache/poi/hssf/usermodel/HSSFCell.java (revision 581034) >+++ src/java/org/apache/poi/hssf/usermodel/HSSFCell.java (working copy) >@@ -521,7 +521,7 @@ > */ > public void setCellValue(Date value) > { >- setCellValue(HSSFDateUtil.getExcelDate(value)); >+ setCellValue(HSSFDateUtil.getExcelDate(value, this.book.isUsing1904DateWindowing())); > } > > /** >Index: src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/Date.java >=================================================================== >--- src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/Date.java (revision 581034) >+++ src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/Date.java (working copy) >@@ -70,7 +70,7 @@ > c.set(year, month, day, 0, 0, 0); > c.set(Calendar.MILLISECOND, 0); > >- return new NumberEval(HSSFDateUtil.getExcelDate(c.getTime())); >+ return new NumberEval(HSSFDateUtil.getExcelDate(c.getTime(), false)); // XXX fix 1900/1904 problem > } > } > >Index: src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/Year.java >=================================================================== >--- src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/Year.java (revision 581034) >+++ src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/Year.java (working copy) >@@ -51,7 +51,7 @@ > if (ve instanceof NumericValueEval) { > NumericValueEval ne = (NumericValueEval) ve; > if (HSSFDateUtil.isValidExcelDate(ne.getNumberValue())) { >- java.util.Date d = HSSFDateUtil.getJavaDate(ne.getNumberValue()); >+ java.util.Date d = HSSFDateUtil.getJavaDate(ne.getNumberValue(), false); // XXX fix 1900/1904 problem > retval = new NumberEval(d.getYear()+1900); > } else { > retval = ErrorEval.NUM_ERROR; >Index: src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/Day.java >=================================================================== >--- src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/Day.java (revision 581034) >+++ src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/Day.java (working copy) >@@ -46,7 +46,7 @@ > if (ve instanceof NumericValueEval) { > NumericValueEval ne = (NumericValueEval) ve; > if (HSSFDateUtil.isValidExcelDate(ne.getNumberValue())) { >- java.util.Date d = HSSFDateUtil.getJavaDate(ne.getNumberValue()); >+ java.util.Date d = HSSFDateUtil.getJavaDate(ne.getNumberValue(), false); // XXX fix 1900/1904 problem > java.util.Calendar c = java.util.Calendar.getInstance(); > c.setTime(d); > retval = new NumberEval(c.get(java.util.Calendar.DAY_OF_MONTH)); >Index: src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/Month.java >=================================================================== >--- src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/Month.java (revision 581034) >+++ src/scratchpad/src/org/apache/poi/hssf/record/formula/functions/Month.java (working copy) >@@ -50,7 +50,7 @@ > if (ve instanceof NumericValueEval) { > NumericValueEval ne = (NumericValueEval) ve; > if (HSSFDateUtil.isValidExcelDate(ne.getNumberValue())) { >- java.util.Date d = HSSFDateUtil.getJavaDate(ne.getNumberValue()); >+ java.util.Date d = HSSFDateUtil.getJavaDate(ne.getNumberValue(), false); // XXX fix 1900/1904 problem > retval = new NumberEval(d.getMonth()+1); > } else { > retval = ErrorEval.NUM_ERROR; >Index: src/scratchpad/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java >=================================================================== >--- src/scratchpad/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java (revision 581034) >+++ src/scratchpad/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java (working copy) >@@ -283,7 +283,7 @@ > format = format.replaceAll("\\\\-","-"); > > // Format as a date >- Date d = HSSFDateUtil.getJavaDate(value); >+ Date d = HSSFDateUtil.getJavaDate(value, false); > DateFormat df = new SimpleDateFormat(format); > return df.format(d); > } else { >Index: src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java >=================================================================== >--- src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java (revision 581034) >+++ src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java (working copy) >@@ -36,6 +36,8 @@ > * > * @author Dan Sherman (dsherman at isisph.com) > * @author Hack Kampbjorn (hak at 2mba.dk) >+ * @author Pavel Krupets (pkrupets at palmtreebusiness dot com) >+ * @author Alex Jacoby (ajacoby at gmail.com) > * @version %I%, %G% > */ > >@@ -67,10 +69,10 @@ > GregorianCalendar date = new GregorianCalendar(2002, 0, 1, > hour, 1, 1); > double excelDate = >- HSSFDateUtil.getExcelDate(date.getTime()); >+ HSSFDateUtil.getExcelDate(date.getTime(), false); > > assertEquals("Checking hour = " + hour, date.getTime().getTime(), >- HSSFDateUtil.getJavaDate(excelDate).getTime()); >+ HSSFDateUtil.getJavaDate(excelDate, false).getTime()); > } > > // check 1900 and 1904 date windowing conversions >@@ -110,7 +112,7 @@ > > cal.set(Calendar.HOUR_OF_DAY, hour); > Date javaDate = cal.getTime(); >- double excelDate = HSSFDateUtil.getExcelDate(javaDate); >+ double excelDate = HSSFDateUtil.getExcelDate(javaDate, false); > double difference = excelDate - Math.floor(excelDate); > int differenceInHours = (int) (difference * 24 * 60 + 0.5) / 60; > assertEquals("Checking " + hour + " hour on Daylight Saving Time start date", >@@ -118,7 +120,7 @@ > differenceInHours); > assertEquals("Checking " + hour + " hour on Daylight Saving Time start date", > javaDate.getTime(), >- HSSFDateUtil.getJavaDate(excelDate).getTime()); >+ HSSFDateUtil.getJavaDate(excelDate, false).getTime()); > } > } > >@@ -130,7 +132,7 @@ > TimeZone cet = TimeZone.getTimeZone("Europe/Copenhagen"); > TimeZone.setDefault(cet); > Calendar cal = new GregorianCalendar(2004, Calendar.MARCH, 28); >- double excelDate = HSSFDateUtil.getExcelDate(cal.getTime()); >+ double excelDate = HSSFDateUtil.getExcelDate(cal.getTime(), false); > double oneHour = 1.0 / 24; > double oneMinute = oneHour / 60; > for (int hour = 0; hour < 24; hour++, excelDate += oneHour) { >@@ -142,10 +144,10 @@ > } > > cal.set(Calendar.HOUR_OF_DAY, hour); >- Date javaDate = HSSFDateUtil.getJavaDate(excelDate); >+ Date javaDate = HSSFDateUtil.getJavaDate(excelDate, false); > assertEquals("Checking " + hour + " hours on Daylight Saving Time start date", > excelDate, >- HSSFDateUtil.getExcelDate(javaDate), oneMinute); >+ HSSFDateUtil.getExcelDate(javaDate, false), oneMinute); > } > } > >@@ -160,7 +162,7 @@ > for (int hour = 0; hour < 24; hour++) { > cal.set(Calendar.HOUR_OF_DAY, hour); > Date javaDate = cal.getTime(); >- double excelDate = HSSFDateUtil.getExcelDate(javaDate); >+ double excelDate = HSSFDateUtil.getExcelDate(javaDate, false); > double difference = excelDate - Math.floor(excelDate); > int differenceInHours = (int) (difference * 24 * 60 + 0.5) / 60; > assertEquals("Checking " + hour + " hour on Daylight Saving Time end date", >@@ -168,7 +170,7 @@ > differenceInHours); > assertEquals("Checking " + hour + " hour on Daylight Saving Time start date", > javaDate.getTime(), >- HSSFDateUtil.getJavaDate(excelDate).getTime()); >+ HSSFDateUtil.getJavaDate(excelDate, false).getTime()); > } > } > >@@ -180,15 +182,15 @@ > TimeZone cet = TimeZone.getTimeZone("Europe/Copenhagen"); > TimeZone.setDefault(cet); > Calendar cal = new GregorianCalendar(2004, Calendar.OCTOBER, 31); >- double excelDate = HSSFDateUtil.getExcelDate(cal.getTime()); >+ double excelDate = HSSFDateUtil.getExcelDate(cal.getTime(), false); > double oneHour = 1.0 / 24; > double oneMinute = oneHour / 60; > for (int hour = 0; hour < 24; hour++, excelDate += oneHour) { > cal.set(Calendar.HOUR_OF_DAY, hour); >- Date javaDate = HSSFDateUtil.getJavaDate(excelDate); >+ Date javaDate = HSSFDateUtil.getJavaDate(excelDate, false); > assertEquals("Checking " + hour + " hours on Daylight Saving Time start date", > excelDate, >- HSSFDateUtil.getExcelDate(javaDate), oneMinute); >+ HSSFDateUtil.getExcelDate(javaDate, false), oneMinute); > } > } > >@@ -315,23 +317,23 @@ > } > > public void testDateBug_2Excel() { >- assertEquals(59.0, HSSFDateUtil.getExcelDate(createDate(1900, CALENDAR_FEBRUARY, 28)), 0.00001); >- assertEquals(61.0, HSSFDateUtil.getExcelDate(createDate(1900, CALENDAR_MARCH, 1)), 0.00001); >+ assertEquals(59.0, HSSFDateUtil.getExcelDate(createDate(1900, CALENDAR_FEBRUARY, 28), false), 0.00001); >+ assertEquals(61.0, HSSFDateUtil.getExcelDate(createDate(1900, CALENDAR_MARCH, 1), false), 0.00001); > >- assertEquals(37315.00, HSSFDateUtil.getExcelDate(createDate(2002, CALENDAR_FEBRUARY, 28)), 0.00001); >- assertEquals(37316.00, HSSFDateUtil.getExcelDate(createDate(2002, CALENDAR_MARCH, 1)), 0.00001); >- assertEquals(37257.00, HSSFDateUtil.getExcelDate(createDate(2002, CALENDAR_JANUARY, 1)), 0.00001); >- assertEquals(38074.00, HSSFDateUtil.getExcelDate(createDate(2004, CALENDAR_MARCH, 28)), 0.00001); >+ assertEquals(37315.00, HSSFDateUtil.getExcelDate(createDate(2002, CALENDAR_FEBRUARY, 28), false), 0.00001); >+ assertEquals(37316.00, HSSFDateUtil.getExcelDate(createDate(2002, CALENDAR_MARCH, 1), false), 0.00001); >+ assertEquals(37257.00, HSSFDateUtil.getExcelDate(createDate(2002, CALENDAR_JANUARY, 1), false), 0.00001); >+ assertEquals(38074.00, HSSFDateUtil.getExcelDate(createDate(2004, CALENDAR_MARCH, 28), false), 0.00001); > } > > public void testDateBug_2Java() { >- assertEquals(createDate(1900, Calendar.FEBRUARY, 28), HSSFDateUtil.getJavaDate(59.0)); >- assertEquals(createDate(1900, Calendar.MARCH, 1), HSSFDateUtil.getJavaDate(61.0)); >+ assertEquals(createDate(1900, Calendar.FEBRUARY, 28), HSSFDateUtil.getJavaDate(59.0, false)); >+ assertEquals(createDate(1900, Calendar.MARCH, 1), HSSFDateUtil.getJavaDate(61.0, false)); > >- assertEquals(createDate(2002, Calendar.FEBRUARY, 28), HSSFDateUtil.getJavaDate(37315.00)); >- assertEquals(createDate(2002, Calendar.MARCH, 1), HSSFDateUtil.getJavaDate(37316.00)); >- assertEquals(createDate(2002, Calendar.JANUARY, 1), HSSFDateUtil.getJavaDate(37257.00)); >- assertEquals(createDate(2004, Calendar.MARCH, 28), HSSFDateUtil.getJavaDate(38074.00)); >+ assertEquals(createDate(2002, Calendar.FEBRUARY, 28), HSSFDateUtil.getJavaDate(37315.00, false)); >+ assertEquals(createDate(2002, Calendar.MARCH, 1), HSSFDateUtil.getJavaDate(37316.00, false)); >+ assertEquals(createDate(2002, Calendar.JANUARY, 1), HSSFDateUtil.getJavaDate(37257.00, false)); >+ assertEquals(createDate(2004, Calendar.MARCH, 28), HSSFDateUtil.getJavaDate(38074.00, false)); > } > > private Date createDate(int year, int month, int day) { >@@ -341,10 +343,21 @@ > return c.getTime(); > } > >+ /** >+ * Check if HSSFDateUtil.getAbsoluteDay works as advertised. >+ */ >+ public void testAbsoluteDay() { >+ // 1 Jan 1900 is 1 day after 31 Dec 1899 >+ GregorianCalendar calendar = new GregorianCalendar(1900, 0, 1); >+ assertEquals("Checking absolute day (1 Jan 1900)", 1, HSSFDateUtil.absoluteDay(calendar, false)); >+ // 1 Jan 1901 is 366 days after 31 Dec 1899 >+ calendar = new GregorianCalendar(1901, 0, 1); >+ assertEquals("Checking absolute day (1 Jan 1901)", 366, HSSFDateUtil.absoluteDay(calendar, false)); >+ } >+ > public static void main(String [] args) { > System.out > .println("Testing org.apache.poi.hssf.usermodel.TestHSSFDateUtil"); > junit.textui.TestRunner.run(TestHSSFDateUtil.class); > } > } >- >Index: src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java >=================================================================== >--- src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java (revision 581034) >+++ src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java (working copy) >@@ -44,6 +44,7 @@ > * paticular datatypes, etc. > * @author Andrew C. Oliver (andy at superlinksoftware dot com) > * @author Dan Sherman (dsherman at isisph.com) >+ * @author Alex Jacoby (ajacoby at gmail.com) > */ > > public class TestHSSFCell >@@ -107,42 +108,106 @@ > } > > /** >- * Checks that the recognition of files using 1904 date windowing >- * is working properly. Conversion of the date is also an issue, >- * but there's a separate unit test for that. >- */ >- public void testDateWindowing() throws Exception { >- GregorianCalendar cal = new GregorianCalendar(2000,0,1); // Jan. 1, 2000 >- Date date = cal.getTime(); >- String path = System.getProperty("HSSF.testdata.path"); >+ * Checks that the recognition of files using 1904 date windowing >+ * is working properly. Conversion of the date is also an issue, >+ * but there's a separate unit test for that. >+ */ >+ public void testDateWindowingRead() throws Exception { >+ GregorianCalendar cal = new GregorianCalendar(2000,0,1); // Jan. 1, 2000 >+ Date date = cal.getTime(); >+ String path = System.getProperty("HSSF.testdata.path"); > >- // first check a file with 1900 Date Windowing >- String filename = path + "/1900DateWindowing.xls"; >- FileInputStream stream = new FileInputStream(filename); >- POIFSFileSystem fs = new POIFSFileSystem(stream); >- HSSFWorkbook workbook = new HSSFWorkbook(fs); >- HSSFSheet sheet = workbook.getSheetAt(0); >+ // first check a file with 1900 Date Windowing >+ String filename = path + "/1900DateWindowing.xls"; >+ FileInputStream stream = new FileInputStream(filename); >+ POIFSFileSystem fs = new POIFSFileSystem(stream); >+ HSSFWorkbook workbook = new HSSFWorkbook(fs); >+ HSSFSheet sheet = workbook.getSheetAt(0); > >- assertEquals("Date from file using 1900 Date Windowing", >- date.getTime(), >- sheet.getRow(0).getCell((short)0) >- .getDateCellValue().getTime()); >- stream.close(); >- >- // now check a file with 1904 Date Windowing >- filename = path + "/1904DateWindowing.xls"; >- stream = new FileInputStream(filename); >- fs = new POIFSFileSystem(stream); >- workbook = new HSSFWorkbook(fs); >- sheet = workbook.getSheetAt(0); >+ assertEquals("Date from file using 1900 Date Windowing", >+ date.getTime(), >+ sheet.getRow(0).getCell((short)0) >+ .getDateCellValue().getTime()); >+ stream.close(); >+ >+ // now check a file with 1904 Date Windowing >+ filename = path + "/1904DateWindowing.xls"; >+ stream = new FileInputStream(filename); >+ fs = new POIFSFileSystem(stream); >+ workbook = new HSSFWorkbook(fs); >+ sheet = workbook.getSheetAt(0); > >- assertEquals("Date from file using 1904 Date Windowing", >- date.getTime(), >- sheet.getRow(0).getCell((short)0) >- .getDateCellValue().getTime()); >- stream.close(); >- } >- >+ assertEquals("Date from file using 1904 Date Windowing", >+ date.getTime(), >+ sheet.getRow(0).getCell((short)0) >+ .getDateCellValue().getTime()); >+ stream.close(); >+ } >+ >+ /** >+ * Checks that dates are properly written to both types of files: >+ * those with 1900 and 1904 date windowing. Note that if the >+ * previous test ({@link #testDateWindowingRead}) fails, the >+ * results of this test are meaningless. >+ */ >+ public void testDateWindowingWrite() throws Exception { >+ GregorianCalendar cal = new GregorianCalendar(2000,0,1); // Jan. 1, 2000 >+ Date date = cal.getTime(); >+ String path = System.getProperty("HSSF.testdata.path"); >+ >+ // first check a file with 1900 Date Windowing >+ String filename = path + "/1900DateWindowing.xls"; >+ writeCell(filename, 0, (short) 1, date); >+ assertEquals("Date from file using 1900 Date Windowing", >+ date.getTime(), >+ readCell(filename, 0, (short) 1).getTime()); >+ >+ // now check a file with 1904 Date Windowing >+ filename = path + "/1904DateWindowing.xls"; >+ writeCell(filename, 0, (short) 1, date); >+ assertEquals("Date from file using 1900 Date Windowing", >+ date.getTime(), >+ readCell(filename, 0, (short) 1).getTime()); >+ } >+ >+ /** >+ * Sets cell value and writes file. >+ */ >+ private void writeCell(String filename, >+ int rowIdx, short colIdx, Date date) throws Exception { >+ FileInputStream stream = new FileInputStream(filename); >+ POIFSFileSystem fs = new POIFSFileSystem(stream); >+ HSSFWorkbook workbook = new HSSFWorkbook(fs); >+ HSSFSheet sheet = workbook.getSheetAt(0); >+ HSSFRow row = sheet.getRow(rowIdx); >+ HSSFCell cell = row.getCell(colIdx); >+ >+ if (cell == null) { >+ cell = row.createCell(colIdx); >+ } >+ cell.setCellValue(date); >+ >+ // Write the file >+ stream.close(); >+ FileOutputStream oStream = new FileOutputStream(filename); >+ workbook.write(oStream); >+ oStream.close(); >+ } >+ >+ /** >+ * Reads cell value from file. >+ */ >+ private Date readCell(String filename, >+ int rowIdx, short colIdx) throws Exception { >+ FileInputStream stream = new FileInputStream(filename); >+ POIFSFileSystem fs = new POIFSFileSystem(stream); >+ HSSFWorkbook workbook = new HSSFWorkbook(fs); >+ HSSFSheet sheet = workbook.getSheetAt(0); >+ HSSFRow row = sheet.getRow(rowIdx); >+ HSSFCell cell = row.getCell(colIdx); >+ return cell.getDateCellValue(); >+ } >+ > /** > * Tests that the active cell can be correctly read and set > */ >Index: src/testcases/org/apache/poi/hssf/usermodel/TestReadWriteChart.java >=================================================================== >--- src/testcases/org/apache/poi/hssf/usermodel/TestReadWriteChart.java (revision 581034) >+++ src/testcases/org/apache/poi/hssf/usermodel/TestReadWriteChart.java (working copy) >@@ -63,7 +63,7 @@ > //System.out.println("first assertion for date"); > assertEquals(new GregorianCalendar(2000, 0, 1, 10, 51, 2).getTime(), > HSSFDateUtil >- .getJavaDate(firstCell.getNumericCellValue())); >+ .getJavaDate(firstCell.getNumericCellValue(), false)); > HSSFRow row = sheet.createRow(( short ) 15); > HSSFCell cell = row.createCell(( short ) 1); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 43551
:
20918
|
20936
|
20937
| 20938 |
20939