Created
September 12, 2015 14:46
-
-
Save robsongomes/a147af5f4c92f89a2c47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.LocalDate; | |
import java.time.Month; | |
public class LocalDateTeste { | |
public static void main(String[] args) { | |
LocalDate agora = LocalDate.now(); | |
System.out.println(agora); | |
//Exibe a data atual no formato YYYY-MM-DD | |
LocalDate dataNascimento = LocalDate.of(1984, Month.MAY, 11); | |
System.out.println(dataNascimento); | |
//Exibe a data fornecida no formato YYYY-MM-DD | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment