
infobip.api.config.FormattedDate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infobip-api-java-client Show documentation
Show all versions of infobip-api-java-client Show documentation
API client in Java for Infobip's API (http://dev.infobip.com/).
package infobip.api.config;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Author: pducic
* Since: 21/10/15
*/
public class FormattedDate {
private static final ThreadLocal DF = new ThreadLocal() {
@Override
public DateFormat initialValue() {
return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
}
};
private final Date date;
public FormattedDate(Date date) {
this.date = date;
}
@Override
public String toString() {
return DF.get().format(date);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy