List of usage examples for org.joda.time LocalDateTime parse
@FromString public static LocalDateTime parse(String str)
From source file:br.com.tecsinapse.datasources.DataParser.java
License:LGPL
public DataParser(String date, String dateTime, String decimal, Integer integer, String string, String empty, String time) {//from w w w .j av a 2 s . c om this.date = LocalDate.parse(date); this.dateTime = LocalDateTime.parse(dateTime); this.decimal = decimal != null ? new BigDecimal(decimal) : null; this.integer = integer; this.string = string; this.empty = empty; this.time = LocalTime.parse(time); }
From source file:br.com.tecsinapse.exporter.converter.LocalDateTableCellConverter.java
License:LGPL
@Override public LocalDate apply(String input) { return Strings.isNullOrEmpty(input) ? null : LocalDateTime.parse(input).toLocalDate(); }
From source file:br.com.tecsinapse.exporter.converter.LocalDateTimeTableCellConverter.java
License:LGPL
@Override public LocalDateTime apply(String input) { return Strings.isNullOrEmpty(input) ? null : LocalDateTime.parse(input); }
From source file:cherry.foundation.validator.JodaTimeMaxValidator.java
License:Apache License
@Override public boolean isValid(ReadablePartial value, ConstraintValidatorContext context) { if (value == null) { return true; } else if (value instanceof LocalDate) { LocalDate max = LocalDate.parse(maxValue); if (inclusive) { return max.compareTo(value) >= 0; } else {/*from w ww. j a va 2 s. co m*/ return max.compareTo(value) > 0; } } else if (value instanceof LocalDateTime) { LocalDateTime max = LocalDateTime.parse(maxValue); if (inclusive) { return max.compareTo(value) >= 0; } else { return max.compareTo(value) > 0; } } else { return true; } }
From source file:cherry.foundation.validator.JodaTimeMinValidator.java
License:Apache License
@Override public boolean isValid(ReadablePartial value, ConstraintValidatorContext context) { if (value == null) { return true; } else if (value instanceof LocalDate) { LocalDate min = LocalDate.parse(minValue); if (inclusive) { return min.compareTo(value) <= 0; } else {//from ww w .jav a 2s . co m return min.compareTo(value) < 0; } } else if (value instanceof LocalDateTime) { LocalDateTime min = LocalDateTime.parse(minValue); if (inclusive) { return min.compareTo(value) <= 0; } else { return min.compareTo(value) < 0; } } else { return true; } }
From source file:com.arangodb.velocypack.module.joda.internal.util.JodaTimeUtil.java
License:Apache License
public static LocalDateTime parseLocalDateTime(final String source) { return LocalDateTime.parse(source); }
From source file:com.avapira.bobroreader.hanabira.entity.HanabiraEntity.java
License:Open Source License
private static LocalDateTime extractLocatDateTime(JsonElement jsonElement) { if (jsonElement == null || jsonElement.isJsonNull()) { return null; } else {/* w w w . j ava2 s . co m*/ return LocalDateTime.parse(jsonElement.getAsString().replace(' ', 'T')); } }
From source file:com.bczyzowski.locator.utils.TinyDB.java
License:Apache License
public ArrayList<Object> getListObject(String key, Class<?> mClass) { ArrayList<String> objStrings = getListString(key); ArrayList<Object> objects = new ArrayList<Object>(); try {/*from w w w. j a v a2 s.c om*/ for (String jObjString : objStrings) { JSONObject object = new JSONObject(jObjString); Log.d("TinyDb", object.getString("time")); Location location = new Location(object.getDouble("latitude"), object.getDouble("longitude"), Float.valueOf(object.getString("accuracy")), LocalDateTime.parse(object.getString("time"))); Log.d("TinyDb", location.toString()); objects.add(location); } } catch (JSONException e) { e.printStackTrace(); } Log.d("TinyDb", "putList : " + objects.toString()); return objects; }
From source file:com.creditcloud.interestbearing.ta.message.asset.UserQueryLatestAssetResponseMessage.java
public LocalDateTime getAccountingTime() { return LocalDateTime.parse(accounting_time); }
From source file:com.dalendev.meteotndata.general.LocalDateTimeAdapter.java
License:Open Source License
public static LocalDateTime unmarshal(String v) { return LocalDateTime.parse(v); }