Previously, the arrays for weekdays and months didn’t match
the values used in admin-ui (Sunday=1, Saturday=7, January=1,
December=12). This commit updates the calculation function
to match admin-ui conventions, ensuring consistency since
the data originates from the admin panel and is read-only here.
Change-Id: I121c18ffb901beaece19124865b88259ffcb2d3f
(cherry picked from commit 2afefb8048)