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

org.knowm.xchange.coinfloor.CoinfloorUtils Maven / Gradle / Ivy

The newest version!
package org.knowm.xchange.coinfloor;

import java.text.ParseException;
import java.util.Date;
import java.util.TimeZone;
import org.apache.commons.lang3.time.FastDateFormat;
import org.knowm.xchange.exceptions.ExchangeException;

public final class CoinfloorUtils {

  private static final FastDateFormat DATE_FORMAT =
      FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"));

  private CoinfloorUtils() {}

  public static Date parseDate(final String date) {
    try {
      return DATE_FORMAT.parse(date);
    } catch (final ParseException e) {
      throw new ExchangeException("Illegal date/time format: " + date, e);
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy