88e1c039
by Francis De Brabandere at 2026-04-24T18:00:34+02:00
vbscript: Implement DatePart built-in function.
Implement DatePart(interval, date [, firstdayofweek [, firstweekofyear]])
with support for all interval types: yyyy, q, m, y, d, w, ww, h, n, s.
The week-of-year ("ww") calculation handles all three firstweekofyear
modes (vbFirstJan1, vbFirstFourDays, vbFirstFullWeek) including the
edge case where dates before week 1 belong to the last week of the
previous year. Uses VarUdateFromDate for day-of-year information.