Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Button handy
blanktrue
color#0052CC
nameSend Feedback
linkhttps://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=Start+of+year+function+-+1222738159
widthauto

Excerpt

Returns a date for the begining of the year like 2024-01-05 00:00:00.

Code Block
function startOfYear() {
    int weeks = week(startOfMonth(currentDate())) - 1;
    interval weeksIntvl = trim(weeks) + "w";
    return startOfMonth(currentDate()) - weeksIntvl;
}
We've encountered an issue exporting this macro. Please try exporting this page again later.