
com.activitystream.helpers.DateHelpers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
For a description please see https://github.com/activitystream/as-sdk-java
package com.activitystream.helpers;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
public class DateHelpers {
public static DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSX");
public static void validateDateString(String timestamp) {
SimpleDateFormat formatter = (SimpleDateFormat) dateFormatter.clone();
try {
formatter.parse(timestamp);
} catch (ParseException e) {
throw new RuntimeException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy