/** * Converts a string date in the given format to a long timestamp * (in Unix format: milliseconds since January 1, 1970). * * @param date The date to convert * @param format The date format to parse the string date * @return The date in milliseconds */ public static long getTime(String date, String format) { return getTime(date, format, null); }
/** * Converts a string date in the given format to a long timestamp * (in Unix format: milliseconds since January 1, 1970). * * @param date The date to convert * @param format The date format to parse the string date * @return The date in milliseconds */ public static long getTime(String date, String format) { return getTime(date, format, null); }
return DateTools.getTime(s, us_format, null);
return DateTools.getTime(s, us_format, null);
private void fillAcquisitionDate(MetadataStore store, String date, int imageIndex) { if (date == null) return; if(DateTools.getTime(date, DateTools.FILENAME_FORMAT) != -1) { Timestamp stamp = new Timestamp( DateTools.formatDate(date, DateTools.FILENAME_FORMAT)); store.setImageAcquisitionDate(stamp, imageIndex); } }
private void fillAcquisitionDate(MetadataStore store, String date, int imageIndex) { if (date == null) return; if(DateTools.getTime(date, DateTools.FILENAME_FORMAT) != -1) { Timestamp stamp = new Timestamp( DateTools.formatDate(date, DateTools.FILENAME_FORMAT)); store.setImageAcquisitionDate(stamp, imageIndex); } }
stamp += DateTools.getTime(date, DateTools.ISO8601_FORMAT);
stamp += DateTools.getTime(date, DateTools.ISO8601_FORMAT);
stamp += DateTools.getTime(date, DateTools.ISO8601_FORMAT);
stamp += DateTools.getTime(date, DateTools.ISO8601_FORMAT);
if (getMetadataOptions().getMetadataLevel() != MetadataLevel.MINIMUM) { for (int i=0; i<timestamps.size(); i++) { long timestamp = DateTools.getTime(timestamps.get(i), DATE_FORMAT, "."); addGlobalMetaList("timestamp", timestamp); long startDate = 0; if (timestamps.size() > 0) { startDate = DateTools.getTime(timestamps.get(0), DATE_FORMAT, "."); long ms = DateTools.getTime(stamp, DATE_FORMAT, "."); store.setPlaneDeltaT(new Time((ms - startDate) / 1000.0, UNITS.SECOND), s, image);
if (getMetadataOptions().getMetadataLevel() != MetadataLevel.MINIMUM) { for (int i=0; i<timestamps.size(); i++) { long timestamp = DateTools.getTime(timestamps.get(i), DATE_FORMAT, "."); addGlobalMetaList("timestamp", timestamp); long startDate = 0; if (timestamps.size() > 0) { startDate = DateTools.getTime(timestamps.get(0), DATE_FORMAT, "."); long ms = DateTools.getTime(stamp, DATE_FORMAT, "."); store.setPlaneDeltaT(new Time((ms - startDate) / 1000.0, UNITS.SECOND), s, image);
cTime = decodeTime(in.readInt()); internalStamps[i] = DateTools.getTime(cDate + " " + cTime, LONG_DATE_FORMAT, ":");
cTime = decodeTime(in.readInt()); internalStamps[i] = DateTools.getTime(cDate + " " + cTime, LONG_DATE_FORMAT, ":");
for (int j=0; j<numStamps; j++) { timestamps[seriesIndex][j] = DateTools.convertDate( DateTools.getTime(getString(64), DATE_FORMAT, ":"), DateTools.UNIX, DATE_FORMAT + ":SSS"); addSeriesMetaList("Timestamp", timestamps[seriesIndex][j]);
for (int j=0; j<numStamps; j++) { timestamps[seriesIndex][j] = DateTools.convertDate( DateTools.getTime(getString(64), DATE_FORMAT, ":"), DateTools.UNIX, DATE_FORMAT + ":SSS"); addSeriesMetaList("Timestamp", timestamps[seriesIndex][j]);