Skip to end of banner
Go to start of banner

Start of year function

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Returns a date for the begining of the year like 2024-01-05 00:00:00.
function startOfYear() {
    int weeks = week(startOfMonth(currentDate())) - 1;
    interval weeksIntvl = trim(weeks) + "w";
    return startOfMonth(currentDate()) - weeksIntvl;
}
  • No labels