Java Format LocalDate to String

Descripción

Format LocalDate to String using DateTimeFormatter


File Template: ❌


Prefix

localdate:format


Scopes

java


Snippet de código

DateTimeFormatter formatter = DateTimeFormatter.ofPattern("${1|yyyy-MM-dd,dd/MM/yyyy,MM/dd/yyyy,dd-MM-yyyy,yyyy/MM/dd|}");
String ${2:formattedDate} = ${3:date}.format(formatter);