All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.activitystream.helpers.DateHelpers Maven / Gradle / Ivy

Go to download

For a description please see https://github.com/activitystream/as-sdk-java

There is a newer version: 0.5.8
Show newest version
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