Something to get started with.
Select Birthdays where Birthday between now-5 days and now+10 days.
var today = DateTime.Now();
var results = session.CreateQuery("select p.Birthday from Person
where p.Birthday>= :from and p.Birthday<=:to")
.SetParameter("from", today.AddDays(10))
.SetParameter("to", today.Subtract(new TimeSpan(5, 0, 0, 0)))
.List<DateTime>();
Although I think you want to get birthdays regardless of the year.
In order to replicate this query in HQL you are going to have to register the specific SQL functions you need using this technique:
Register Custom SQL Function in NHibernate
Then you should be able to replicate your SQL query in HQL.
This is a good question on the SQL side of things:
SQL Select Upcoming Birthdays
Fresh tactics:
Register the SQL Function for the datediff:
RegisterFunction("datediffdays",
new SQLFunctionTemplate(NHibernateUtil.Int32, "datediff(dd,?1, ?2)"));
HQL Query
var result = session.CreateQuery(@"from Person
where 1 = (floor(datediffdays(Birthday,current_timestamp()+10) / 365.25))
- (datediffdays(Birthday,current_timestamp()-5) / 365.25))")
.List<Person>();