org.jwat.warc
Class WarcDateParser

java.lang.Object
  extended by org.jwat.warc.WarcDateParser

public class WarcDateParser
extends Object

WARC-Date parser and format validator. The format "yyyy-MM-dd'T'HH:mm:ss'Z'" is specified in the WARC ISO standard.

Author:
lbihanic, selghissassi, nicl

Method Summary
static Date getDate(String dateStr)
          Parses the date using the format "yyyy-MM-ddTHH:mm:ssZ".
static DateFormat getDateFormat()
          Return a DateFormat object which can be used to string format WARC dates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDate

public static Date getDate(String dateStr)
Parses the date using the format "yyyy-MM-ddTHH:mm:ssZ".

Parameters:
dateStr - the date to parse
Returns:
the formatted date or null based on whether the date to parse is compliant with the format "yyyy-MM-ddTHH:mm:ssZ" or not

getDateFormat

public static DateFormat getDateFormat()
Return a DateFormat object which can be used to string format WARC dates.

Returns:
DateFormat object which can be used to string format WARC dates.


Copyright © 2011-2012. All Rights Reserved.