Wix dataset sort by date and month

Because JS-dates are expressed as a number of milliseconds since Jan 01, 1970, UTC + 0, you cannot directly select or sort on day and months inside a query. I think the best solution would be:

  1. define 2 extra columns in your collection, called bMonth and bDay, to store month and day per person
  2. on the wix-data hooks beforeInsert and beforeUpdate (Hooks - Velo API Reference - Wix.com)you use https://www.w3schools.com/jsref/jsref_getdate.asp and https://www.w3schools.com/jsref/jsref_getmonth.asp to deduce day and month from the birthday-date. Put those two values in the two corresponding columns.
    Watch out that January=0, Feb= 1, and so on, so always add 1.
    3)now when you want that list, you query on bMonth and bDay (you will have to define the tolerance, like Today +/- 1 day, 2 days etc.) But at least you have the two columns now to select/sort on
  3. display result inside repeater