Olá pessoal, Bom dia !
Gostaria de saber se é possível, dado uma lista de LocalDateTime, eu fazer tipo um “Group By” por quinzena.
Por mes, semana e dia eu consegui, com os metodos que o LocalDateTime me da, mas ele não tem nenhum metodo para pegar a quinzena do mês.
Alguém sabe uma maneira de fazer isso ?
public boolean isMesmoDia(ControleCombustivel c){
int a = c.getData().getDayOfYear();
int b = this.getData().getDayOfYear();
return a == b;
}
public boolean isMesmoMes(ControleCombustivel c){
int a = c.getData().getMonthOfYear()+c.getData().getYear();
int b = this.getData().getMonthOfYear()+this.getData().getYear();
return a == b;
}
public boolean isMesmaSemana(ControleCombustivel c){
int a = c.getData().getWeekOfWeekyear();
int b = this.getData().getWeekOfWeekyear();
return a == b;
}
Desde já agradeço!
