List of usage examples for org.joda.time LocalTime toString
@ToString
public String toString()
From source file:com.sandata.lab.common.utils.date.DateUtil.java
License:Open Source License
public static String convertJodaDateTimetoString(LocalDate localDate, LocalTime localTime, String dateFormat) { LocalDateTime localDateTime = new LocalDateTime(localDate.toString() + "T" + localTime.toString()); DateTimeFormatter fmt = DateTimeFormat.forPattern(dateFormat); return localDateTime.toString(fmt); }
From source file:com.sheepdog.mashmesh.models.OfyJodaLocalTimeConverter.java
License:Apache License
@Override public Object forDatastore(Object value, ConverterSaveContext ctx) { if (!(value instanceof LocalTime)) { return null; }/*w ww . j a v a 2 s .c o m*/ LocalTime localTime = (LocalTime) value; return localTime.toString(); }
From source file:com.superrent.modules.CommonFunc.java
public static String sqlTime(JSpinner HH, JSpinner MM) { String hh = String.valueOf(HH.getValue()); String mm = String.valueOf(MM.getValue()); String ss = "00"; String time = hh + ":" + mm + ":" + ss; DateTimeFormatter f = DateTimeFormat.forPattern("HH:mm:ss"); LocalTime tim = f.parseLocalTime(time); return tim.toString().substring(0, 8); }
From source file:energy.usef.core.adapter.YodaTimeAdapter.java
License:Apache License
/** * Transforms a {@link LocalTime} to a String (xsd:time). * /*from www.j av a 2s.c o m*/ * @param date {@link LocalTime} * @return String (xsd:time) */ public static String printTime(LocalTime date) { if (date == null) { return null; } return date.toString(); }
From source file:graphene.util.time.JodaTimeUtil.java
License:Apache License
public static String toString(final LocalTime lt) { final String s = (lt == null ? null : lt.toString()); return s;/* www .j a v a 2s. c om*/ }
From source file:org.apache.cayenne.joda.access.types.LocalTimeType.java
License:Apache License
@Override public String toString(LocalTime value) { if (value == null) { return "NULL"; }/*from w w w .j ava2 s .c o m*/ return '\'' + value.toString() + '\''; }
From source file:org.apache.isis.schema.utils.jaxbadapters.JodaLocalTimeStringAdapter.java
License:Apache License
public static String print(LocalTime date) { return date != null ? date.toString() : null; }
From source file:org.jadira.usertype.dateandtime.joda.columnmapper.IntegerColumnLocalTimeMapper.java
License:Apache License
@Override public String toNonNullString(LocalTime value) { return value.toString(); }
From source file:org.jadira.usertype.dateandtime.joda.columnmapper.StringColumnLocalTimeMapper.java
License:Apache License
@Override public String toNonNullValue(LocalTime value) { if (value.getMillisOfSecond() == 0) { if (value.getSecondOfMinute() == 0) { return Formatter.LOCAL_TIME_NOSECONDS_PRINTER.print(value); }/*from ww w . j a v a 2 s.c om*/ return Formatter.LOCAL_TIME_NOMILLIS_PRINTER.print(value); } else { return value.toString(); } }
From source file:org.libreplan.importers.tim.TimTimeAdapter.java
License:Open Source License
@Override public String marshal(LocalTime localTime) throws Exception { return localTime.toString(); }