<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to support-requests</title><link href="https://sourceforge.net/p/pojava/support-requests/" rel="alternate"/><link href="https://sourceforge.net/p/pojava/support-requests/feed.atom" rel="self"/><id>https://sourceforge.net/p/pojava/support-requests/</id><updated>2011-06-29T21:16:39Z</updated><subtitle>Recent changes to support-requests</subtitle><entry><title>Date parsing doesn't work if year is not present</title><link href="https://sourceforge.net/p/pojava/support-requests/3/" rel="alternate"/><published>2011-06-29T21:16:39Z</published><updated>2011-06-29T21:16:39Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net8a391642b3691447376489cd8a790e2b9f9145fe</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;In the following form (from a SYSLOG event)&lt;br /&gt;
Jun 29 00:30:22&lt;/p&gt;
&lt;p&gt;The code complains that [30] isn't a valid hour.&lt;/p&gt;
&lt;p&gt;There are 2 possible ways to fix this, one is to make smarter use of the ':' and "force" it to an hour.  The other is to assume no year if any of the following stuff is invalid for the type.  However, 2 won't work if everything is valid.&lt;/p&gt;
&lt;p&gt;Another way would be to add a config param for that but this kinda defeats the purpose for having the parsing be automatic.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Fooled in month detection</title><link href="https://sourceforge.net/p/pojava/support-requests/2/" rel="alternate"/><published>2010-10-14T19:30:53Z</published><updated>2010-10-14T19:30:53Z</updated><author><name>sereende</name><uri>https://sourceforge.net/u/sereende/</uri></author><id>https://sourceforge.netb231baa1752f4d9ef85d318dabfc00bafd899bd0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;When parse()-ing the string "Mark on October 14, 2010, 4:58 AM", the result is a March 14, 2010 date. Given that "Mark" is a full word, it seems the code is just checking the initial part for match against "Mar" as a month name for March, instead of checking the entire "Mark" word against the pattern.&lt;/p&gt;
&lt;p&gt;Any chance to correct that?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Add additional validation to date parsing</title><link href="https://sourceforge.net/p/pojava/support-requests/1/" rel="alternate"/><published>2010-07-31T16:23:45Z</published><updated>2010-07-31T16:23:45Z</updated><author><name>Predrag Stanar</name><uri>https://sourceforge.net/u/pstanar/</uri></author><id>https://sourceforge.neted976f15b63cb54f7c8ddebb230b382c371b2e45</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;In order to prevent dates like 2010-05-00, or 2010-00-25 additional validation code should be added to DateTime parse() method. Something like:&lt;/p&gt;
&lt;p&gt;if (day &amp;lt; 1) {&lt;br /&gt;
throw new IllegalArgumentException("Invalid day :" + day);&lt;br /&gt;
}&lt;br /&gt;
if (month &amp;lt; 1) {&lt;br /&gt;
throw new IllegalArgumentException("Invalid month :" + month);&lt;br /&gt;
}&lt;br /&gt;
// Year can actually be BC and assumed negative, think about this one&lt;br /&gt;
if (year &amp;lt; 1) {&lt;br /&gt;
throw new IllegalArgumentException("Invalid year :" + year);&lt;br /&gt;
}&lt;br /&gt;
if (hour &amp;lt; 0 || hour &amp;gt;= 24) {&lt;br /&gt;
throw new IllegalArgumentException("Invalid hour :" + hour);&lt;br /&gt;
}&lt;br /&gt;
if (minute &amp;lt; 0 || minute &amp;gt;= 60) {&lt;br /&gt;
throw new IllegalArgumentException("Invalid minute :" + minute);&lt;br /&gt;
}&lt;br /&gt;
if (second &amp;lt; 0 || second &amp;gt;= 60) {&lt;br /&gt;
throw new IllegalArgumentException("Invalid second :" + second);&lt;br /&gt;
}&lt;br /&gt;
if (nanosecond &amp;lt; 0 || nanosecond &amp;gt;= 1000000000) {&lt;br /&gt;
throw new IllegalArgumentException("Invalid nanosecond :" + nanosecond);&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>