days-up-to-month - returns the number of days in a year, preceding the given month.
1 2 days-in-months: [31 28 31 30 31 30 31 31 30 31 30 31] 3 days-in-months-leap: head change at copy days-in-months 2 29 4 5 days-up-to-month: func [month /in year] [ 6 sum copy/part either leap-year?/with any [year now] [days-in-months-leap] [days-in-months] month - 1 7 ]