On Tuesday, October 3, 2017 at 4:48:52 PM UTC-7, Jim S wrote:
>
> I don't think that will do it. The date stored in the database would be 
> 10/15/1980, or 10/21/1993.
>
> Those should both show a birthday in the month of August. 
>

Er, October?
 

> But, I don't want just a matching month. I want it for the next 30 days. 
>
> So, on December 15th I should see all birthdays between December 15th and 
> January 15th regardless of what year the birthday is in.
>
> Jim
>
>
It's not too much more.  You identify the current day and month, and the 
day and month of 30 days from now, and do 2 selects:
First for the bdays whose month matches the current and whose day is 
greater than today.
Second for the bdays whose month matches the successor month and whose day 
is less than the +30 day.

(My example covers years from 1600 to present, for composers.  i also have 
getting everybody in any single calendar month, which is just one query.  
Results for October:

Paul Abraham Dukas 1865-10-01
Stephen Michael Reich 1936-10-03
Louis Ferdinand Gottschalk 1864-10-07
Toru Takemitsu 1930-10-08
Giulio Romolo Caccini 1551-10-08
Charles-Camille Saint-Saëns 1835-10-09
Einojuhani Rautavaara 1928-10-09
Giuseppe Fortunino Francesco Verdi 1813-10-10
Ralph Vaughan Williams 1872-10-12
Sylvius Leopold Weiss 1687-10-12
Healey Willan 1880-10-12
Ciprian Porumbescu 1853-10-14
Dag Ivar Wirén 1905-10-15
Jan Dismas Zelenka 1679-10-16
Albert Franz Doppler 1821-10-16
Domenico Zipoli 1688-10-17
Herbert Norman Howells 1892-10-17
Baldassare Galuppi 1706-10-18
Howard Leslie Shore 1946-10-18
Charles Edward Ives 1874-10-20
Sir Malcolm Henry Arnold 1921-10-21
Joseph Canteloube 1879-10-21
Franz Liszt 1811-10-22
Ned Rorem 1923-10-23
Johann Baptist (II) Strauss 1825-10-25
Georges Bizet 1838-10-25
Peter Lieberson 1946-10-25
Giuseppe Domenico Scarlatti 1685-10-26
Niccolò Paganini 1782-10-27
Carl Davis 1936-10-28
Peter Warlock 1894-10-30
Unico Wilhelm van Wassenaer 1692-10-30

)



/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to