I'm trying to build an arcade expression that evaluates the week number of the year and does a formats the popup a specific way depending on if the week is odd or even. I'm struggling to get this working with arcade as I can't find an equivalent to new Date(now.getFullYear(), 0, 1) to get the first day of the year.
Essentially the logic i am trying to recreate in arcade is
now = new Date();
today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
onejan = new Date(now.getFullYear(), 0, 1);
numOfWeek = Math.ceil((((today - firstOfYear) / 86400000)-1)/7);
I can do the majority of it on my own I'm just not sure of the now.GetFullYear() part. Any assistance is appreciated.