Created
September 12, 2015 15:29
-
-
Save robsongomes/398f7827d5258298b8cc 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; | |
public class LocalDateMetodos1 { | |
public static void main(String[] args) { | |
LocalDate hoje = LocalDate.now(); | |
LocalDate daquiACincoDias = hoje.plusDays(5); | |
LocalDate daquiADuasSemanas = hoje.plusWeeks(2); | |
LocalDate daquiASeisMeses = hoje.plusWeeks(6); | |
LocalDate anoQueVem = hoje.plusYears(1); | |
LocalDate ontem = hoje.minusDays(1); | |
LocalDate semanaPassada = hoje.minusWeeks(1); | |
LocalDate mesPassado = hoje.minusMonths(1); | |
LocalDate anoPassado = hoje.minusYears(1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment