Java LocalDateTime to toDateHeader(LocalDateTime dt)

Here you can find the source of toDateHeader(LocalDateTime dt)

Description

to Date Header

License

Apache License

Declaration

public static String toDateHeader(LocalDateTime dt) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.time.LocalDateTime;

import java.time.format.TextStyle;

import java.util.Locale;

public class Main {
    public static String toDateHeader(LocalDateTime dt) {
        return String.format("%s, %02d %s %d %s GMT",
                dt.getDayOfWeek().getDisplayName(TextStyle.SHORT, Locale.ENGLISH), dt.getDayOfMonth(),
                dt.getMonth().getDisplayName(TextStyle.SHORT, Locale.ENGLISH), dt.getYear(), dt.toLocalTime());
    }//ww  w.j av  a  2 s  .c  o m
}

Related

  1. longTOLocalDateTime(long minDate)
  2. luisDate(LocalDateTime date)
  3. millisToLocalDateTime(Long inMillis)
  4. toDate(LocalDateTime dateTime)
  5. toDate(LocalDateTime ldt)
  6. toDateUTCFromJST(LocalDateTime dateTime)
  7. toJava8(org.joda.time.LocalDateTime x)
  8. toJsonDate(LocalDateTime date)
  9. tokenExpired(LocalDateTime expiryDate)