I have a list "BonusHistory" with many objects, which I find by "bonus id"
List<BonusHistory> bonusHistories = bonusHistoryRepository.findAllByBonusIdAndDeletedAtIsNull(id);
Now I need to get from these list, objects which were created from (yesterday, last week, last month) till now. Maybe i need to change query in repository, idk. I am sorry if I explained incomprehensibly (i'm newbie in programming)