Created
November 10, 2013 22:51
-
-
Save marti1125/7405008 to your computer and use it in GitHub Desktop.
get first day and last day of month using jodatime
This file contains hidden or 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
DateTimeFormatter formatterFecha = DateTimeFormat.forPattern("dd/MM/yyyy"); | |
DateTime primerDiaDelMes = new DateTime().dayOfMonth().withMinimumValue(); | |
String desde = new LocalDate(primerDiaDelMes).toString(formatterFecha); | |
DateTime ultimoDiaDelMes = new DateTime().dayOfMonth().withMaximumValue(); | |
String hasta = new LocalDate(ultimoDiaDelMes).toString(formatterFecha); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment