本文整理了Java中org.joda.time.LocalTime.toString()
方法的一些代码示例,展示了LocalTime.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalTime.toString()
方法的具体详情如下:
包路径:org.joda.time.LocalTime
类名称:LocalTime
方法名:toString
[英]Output the time in ISO8601 format (HH:mm:ss.SSSZZ).
[中]以ISO8601格式输出时间(HH:mm:ss.SSSZZ)。
代码示例来源:origin: joda-time/joda-time
/**
* Output the time using the specified format pattern.
*
* @param pattern the pattern specification, null means use <code>toString</code>
* @see org.joda.time.format.DateTimeFormat
*/
public String toString(String pattern) {
if (pattern == null) {
return toString();
}
return DateTimeFormat.forPattern(pattern).print(this);
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Output the time using the specified format pattern.
*
* @param pattern the pattern specification, null means use <code>toString</code>
* @see org.joda.time.format.DateTimeFormat
*/
public String toString(String pattern) {
if (pattern == null) {
return toString();
}
return DateTimeFormat.forPattern(pattern).print(this);
}
代码示例来源:origin: joda-time/joda-time
/**
* Output the time using the specified format pattern.
*
* @param pattern the pattern specification, null means use <code>toString</code>
* @param locale Locale to use, null means default
* @see org.joda.time.format.DateTimeFormat
*/
public String toString(String pattern, Locale locale) throws IllegalArgumentException {
if (pattern == null) {
return toString();
}
return DateTimeFormat.forPattern(pattern).withLocale(locale).print(this);
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Output the time using the specified format pattern.
*
* @param pattern the pattern specification, null means use <code>toString</code>
* @param locale Locale to use, null means default
* @see org.joda.time.format.DateTimeFormat
*/
public String toString(String pattern, Locale locale) throws IllegalArgumentException {
if (pattern == null) {
return toString();
}
return DateTimeFormat.forPattern(pattern).withLocale(locale).print(this);
}
代码示例来源:origin: ebean-orm/ebean
@Override
public String formatValue(LocalTime v) {
return v.toString();
}
代码示例来源:origin: ebean-orm/ebean
@Override
public void jsonWrite(JsonGenerator writer, LocalTime value) throws IOException {
writer.writeString(value.toString());
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Output the time using the specified format pattern.
*
* @param pattern the pattern specification, null means use <code>toString</code>
* @see org.joda.time.format.DateTimeFormat
*/
public String toString(String pattern) {
if (pattern == null) {
return toString();
}
return DateTimeFormat.forPattern(pattern).print(this);
}
代码示例来源:origin: apache/avro
Assert.assertThat(withJoda.getT().toString(), is(withJsr310.getT().toString()));
Assert.assertThat(withJoda.getTs().toString(), is(withJsr310.getTs().toString()));
Assert.assertThat(withJoda.getDec(), comparesEqualTo(withJsr310.getDec()));
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Output the time using the specified format pattern.
*
* @param pattern the pattern specification, null means use <code>toString</code>
* @param locale Locale to use, null means default
* @see org.joda.time.format.DateTimeFormat
*/
public String toString(String pattern, Locale locale) throws IllegalArgumentException {
if (pattern == null) {
return toString();
}
return DateTimeFormat.forPattern(pattern).withLocale(locale).print(this);
}
代码示例来源:origin: Jasig/uPortal
@Override
public String toString() {
return time.toString();
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
/**
* Output the time using the specified format pattern.
*
* @param pattern the pattern specification, null means use <code>toString</code>
* @see org.joda.time.format.DateTimeFormat
*/
public String toString(String pattern) {
if (pattern == null) {
return toString();
}
return DateTimeFormat.forPattern(pattern).print(this);
}
代码示例来源:origin: redfish64/TinyTravelTracker
/**
* Output the time using the specified format pattern.
*
* @param pattern the pattern specification, null means use <code>toString</code>
* @see org.joda.time.format.DateTimeFormat
*/
public String toString(String pattern) {
if (pattern == null) {
return toString();
}
return DateTimeFormat.forPattern(pattern).print(this);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Output the time using the specified format pattern.
*
* @param pattern the pattern specification, null means use <code>toString</code>
* @see org.joda.time.format.DateTimeFormat
*/
public String toString(String pattern) {
if (pattern == null) {
return toString();
}
return DateTimeFormat.forPattern(pattern).print(this);
}
代码示例来源:origin: org.joda/com.springsource.org.joda.time
/**
* Output the time using the specified format pattern.
*
* @param pattern the pattern specification, null means use <code>toString</code>
* @see org.joda.time.format.DateTimeFormat
*/
public String toString(String pattern) {
if (pattern == null) {
return toString();
}
return DateTimeFormat.forPattern(pattern).print(this);
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/**
* Output the time using the specified format pattern.
*
* @param pattern the pattern specification, null means use <code>toString</code>
* @see org.joda.time.format.DateTimeFormat
*/
public String toString(String pattern) {
if (pattern == null) {
return toString();
}
return DateTimeFormat.forPattern(pattern).print(this);
}
代码示例来源:origin: net.ftlines.wicket-fullcalendar/wicket-fullcalendar-core
@Override
public void serialize(LocalTime value, JsonGenerator jgen, SerializerProvider provider) throws IOException,
JsonProcessingException {
jgen.writeString(value.toString("h:mmaa"));
}
代码示例来源:origin: com.github.workerframework/worker-testing-integration
private void logWithTimestamp(final String debugInfo)
{
System.out.println(DateTime.now().toLocalTime().toString() + debugInfo);
}
}
代码示例来源:origin: com.synaptix/SynaptixWidget
@Override
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
pos.setBeginIndex(0);
pos.setEndIndex(0);
toAppendTo.append(((LocalTime) obj).toString(dateTimeFormatter));
return toAppendTo;
}
代码示例来源:origin: JodaOrg/joda-time-hibernate
public void nullSafeSet(PreparedStatement preparedStatement, Object value, int index) throws HibernateException, SQLException {
if (value == null) {
StandardBasicTypes.STRING.nullSafeSet(preparedStatement, null, index);
} else {
LocalTime lt = ((LocalTime) value);
StandardBasicTypes.STRING.nullSafeSet(preparedStatement, lt.toString(), index);
}
}
代码示例来源:origin: dremio/dremio-oss
@Test
public void testToChar() throws Exception {
String expectedResults[] = {(new LocalDate(2008, 2, 23)).toString("yyyy-MMM-dd"),
(new LocalTime(12, 20, 30)).toString("HH mm ss"),
(new LocalDateTime(2008, 2, 23, 12, 0, 0)).toString("yyyy MMM dd HH:mm:ss")};
testCommon(expectedResults, "/functions/date/to_char.json", "/test_simple_date.json");
}
内容来源于网络,如有侵权,请联系作者删除!