skype.SkypeChatDateFormatImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of skype2gmail Show documentation
Show all versions of skype2gmail Show documentation
Send skype chat history to a gmail account
The newest version!
package skype;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class SkypeChatDateFormatImpl implements SkypeChatDateFormat {
private final SimpleDateFormat dateFormat;
public SkypeChatDateFormatImpl() {
dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
}
@Override
public String format(Date time) {
return dateFormat.format(time);
}
@Override
public Date parse(String time) {
try {
return dateFormat.parse(time);
} catch (ParseException e) {
throw new MessageProcessingException(e);
}
}
}