com.beust.jcommander.converters
Class ISO8601DateConverter

java.lang.Object
  extended by com.beust.jcommander.converters.BaseConverter<Date>
      extended by com.beust.jcommander.converters.ISO8601DateConverter
All Implemented Interfaces:
IStringConverter<Date>

public class ISO8601DateConverter
extends BaseConverter<Date>

Converts a String to a Date. TODO Modify to work with all valid ISO 8601 date formats (currently only works with yyyy-MM-dd).

Author:
Angus Smithson

Constructor Summary
ISO8601DateConverter(String optionName)
           
 
Method Summary
 Date convert(String value)
           
 
Methods inherited from class com.beust.jcommander.converters.BaseConverter
getErrorString, getOptionName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ISO8601DateConverter

public ISO8601DateConverter(String optionName)
Method Detail

convert

public Date convert(String value)
Returns:
an object of type created from the parameter value.


Copyright © 2012. All Rights Reserved.