Skip to content
Gallery
Coda Template : Days, Weeks and Months
Share
Explore
Weeks

icon picker
Week numbers → Months

Two numbers are all you need → fill out the blue fields
In the tabel below I work with WeekNumber() and this one takes Sunday as the first day of the week. You can replace it by IsoWeekNumber() to start your week on Monday. The Forced Choice is based on part in the code block in blue.
Get a month
my weeknumber
year
month number
Copy of month number
month name(s)
M # unique
Month name(s) - unique
Forced Unique Choice
1
6
2021
1222222
2/8/2021
JanuaryFebruaryFebruaryFebruaryFebruaryFebruaryFebruary
12
JanuaryFebruary
February
2
23
2021
5566666
6/7/2021
MayMayJuneJuneJuneJuneJune
56
MayJune
June
There are no rows in this table

Sequence(Date(thisRow.year,01,01),Date(thisRow.year,12,31)).Filter(CurrentValue.WeekNumber() = thisRow.[my weeknumber]).FormulaMap(CurrentValue.monthname()).WithName(TheMonths,
Sequence(1,TheMonths.Count()).FormulaMap(TheMonths.Nth(CurrentValue) =TheMonths.First()).CountIf(CurrentValue=True()).WithName(OutCome,
If(OutCome >=4, TheMonths.First(), TheMonths.Last())
)
)
This solution I also posted in the . Therefor you find the code part below the table.




Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.