There are .all_... methods for durations:

DateTime.now.all_year
=> Mon, 01 Jan 2024 00:00:00 +0200..Tue, 31 Dec 2024 23:59:59 +0200

Similar exist for a week, day, etc.