Hi Eric,

thanks for sharing your code!

As far I could see on a first scan, it looks very good.


> The result starts with "Wednesday" instead of
> "Monday" as for the week 41 or other weeks!

The values have no inherent ordering, as they all have the same key (the
combination of year and day). So they may appear in any order, just by chance
starting on Monday (probably due to the order the objects were imported).

If you want to collect the days in order, you could just use the 'date' index,
and calculate the range from the week (I don't know that algorithm at the
moment. Assuming we had such functions, we could do

   (collect 'date '+Agenda (weekStart 2019 42) (weekEnd 2019 42))

This would be the most efficient way.


Otherwise you could sort it

  (by '((This) (: date)) sort (collect 'year '+Agenda (2019 42)))

with a little more overhead.

☺/ A!ex


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to