Datepart-func
The datepart function takes a Julian-day value d (double) and returns that portion identified by specifier datepart$. Optional parameter n applies only to datepart$ = ww or w.
See this note.
Datepart(datepart$, d [, n])
d
datepart$
n
Portion of the Julian-day value returned as a double.
datepart(yyyy, 2457360.5107885)=; // returns 2015
datepart(y, Today())=; // returns the day number of the current year
datepart(w, 2457360.5107885, 1)=; // returns 6
datepart(w, 2457360.5107885)=; // returns 5
//January 1, 2022 is on Saturday datepart(ww, date(1/1/2022))=; // returns 1 datepart(ww, date(1/1/2022),4)=; // returns 52