| Issue 1: | Add ability to change DataFormat for DateProcessor | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Now it is impossible to change DateFormat in DateProcessor. ValueProcessorProvider creates DateProcessor uses constructor with DateFormat argument: registerValueProcessor(Date.class, new DateProcessor(DateFormat.getDateInstance())); It will be usable to have ability to set DateFormat for java.util.Date format?
Aug 20, 2012
#1
guram.sa...@gmail.com
Aug 20, 2012
Seems like it is possible to remove DateProcessor added by default in constructor of ValueProcessorProvider. Then added new DateProcessor with specified DateFormat as argument can be used.
Aug 22, 2012
Yes, you are right. You can register your own Date value processor, as you said: ValueProcessorProvider vpp = new ValueProcessorProvider(); vpp.removeValueProcessor(Date.class); vpp.registerValueProcessor(Date.class, new DateProcessor(yourDateFormat)); [...] CSVReader<Person> csvReader = new CSVReaderBuilder<Person>(csvFile).entryParser( new AnnotationEntryParser<Person>(Person.class, vpp)).build();
Aug 22, 2012
Solution in comment 3.
Status:
Invalid
Owner: skiron...@gmail.com |