package wf.doyle.blockbuster.item.items.printed;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import wf.doyle.blockbuster.App;
import wf.doyle.blockbuster.item.PrintedItem;
import wf.doyle.blockbuster.util.EnumLineType;
public class Periodical extends PrintedItem {
private String publicationDate;
public Date getPublicationDate()
{
try
{
return new SimpleDateFormat("dd-MM-yy").parse(this.publicationDate);
}
catch(ParseException e)
{
App.LOGGER.error("Error parsing publication date", e);
return new Date();
}
}
@Override
public EnumLineType getType()
{
return EnumLineType.PERIODICAL;
}
}