Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 11860 invoked from network); 2 Jan 2004 22:07:45 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Jan 2004 22:07:45 -0000 Received: (qmail 92049 invoked by uid 500); 2 Jan 2004 22:07:33 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 91905 invoked by uid 500); 2 Jan 2004 22:07:31 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 91890 invoked from network); 2 Jan 2004 22:07:31 -0000 Received: from unknown (HELO mxout4.cac.washington.edu) (140.142.33.19) by daedalus.apache.org with SMTP; 2 Jan 2004 22:07:31 -0000 Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9]) by mxout4.cac.washington.edu (8.12.10+UW03.09/8.12.10+UW03.09) with ESMTP id i02M7b9n020540 for ; Fri, 2 Jan 2004 14:07:37 -0800 Received: from [10.0.1.2] (pool-68-160-34-79.bos.east.verizon.net [68.160.34.79]) (authenticated bits=0) by smtp.washington.edu (8.12.10+UW03.09/8.12.10+UW03.09) with ESMTP id i02M7Zvn018372 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 2 Jan 2004 14:07:36 -0800 Mime-Version: 1.0 (Apple Message framework v609) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <109F9966-3D70-11D8-920E-00306557E112@u.washington.edu> Content-Transfer-Encoding: 7bit From: Michael Becke Subject: Re: DateParser pluggability Date: Fri, 2 Jan 2004 17:07:33 -0500 To: "Commons HttpClient Project" X-Mailer: Apple Mail (2.609) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hello, Date parser formats can be configured in the post 2.0 HttpClient code. This code, in CVS HEAD, is still pre-alpha but everything should still be working. You can add a format using something like the following: HttpParams params = DefaultHttpParams.getDefaultParams(); HashSet patterns = new HashSet((Collection) params.getParameter(DateParser.KEY_DATE_PATTERNS)); patterns.add("SOME_PATTERN"); params.setParameter(DateParser.KEY_DATE_PATTERNS, patterns); Mike On Dec 31, 2003, at 10:57 AM, protean wrote: > I have had to supply an extra format String as follows: > > /** The patterns used for parsing dates */ > private static final String[] DATE_PATTERNS = { > PATTERN_RFC1123, > PATTERN_RFC1036, > PATTERN_ASCTIME, > "EEE, dd-MMM-yyyy HH:mm:ss z", > "EEE, dd-MMM-yyyy HH-mm-ss z", > "EEE, dd MMM yy HH:mm:ss z", > "EEE dd-MMM-yyyy HH:mm:ss z", > "EEE dd MMM yyyy HH:mm:ss z", > "EEE dd-MMM-yyyy HH-mm-ss z", > "EEE dd-MMM-yy HH:mm:ss z", > "EEE dd MMM yy HH:mm:ss z", > "EEE,dd-MMM-yy HH:mm:ss z", > "EEE,dd-MMM-yyyy HH:mm:ss z", > "EEE, dd-MM-yyyy HH:mm:ss z", > // Extra for non-compliant site > "dd-MMM-yyyy HH:mm:ss zzz" > }; > > to the DateParser class and produce my own build, as the DateParser > does not > seem to provide pluggability for non-compliant sites. Can anyone tell > me when > this situation may change so I no longer have to produce a one-man > code fork? > > C Johnson > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > commons-httpclient-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: > commons-httpclient-dev-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org