List of usage examples for io.netty.handler.codec DateFormatter format
public static String format(Date date)
From source file:com.linecorp.armeria.common.StringValueConverter.java
License:Apache License
@Nullable @Override// ww w . j a v a2 s . c o m public String convertObject(@Nullable Object value) { if (value == null) { return null; } if (value instanceof Date) { return DateFormatter.format((Date) value); } if (value instanceof Calendar) { return DateFormatter.format(((Calendar) value).getTime()); } if (value instanceof Instant) { return DateFormatter.format(new Date(((Instant) value).toEpochMilli())); } return value.toString(); }
From source file:com.linecorp.armeria.common.StringValueConverter.java
License:Apache License
@Override public String convertTimeMillis(long value) { return DateFormatter.format(new Date(value)); }
From source file:com.linecorp.armeria.server.file.HttpFileServiceTest.java
License:Apache License
private static String httpDate(Date date) { return DateFormatter.format(date); }