Skip to main content
Question

DateTime Calculations and Leap Years

  • November 27, 2020
  • 1 reply
  • 21 views

ebygomm
Influencer
Forum|alt.badge.img+46

Just wanted to check before I put something in place to handle it. Is there anything in either the Date/Time Functions or Date Time Converter that allows you to specify that 1 year on from the 29 February 2020 is the 1st March 2021 rather than the 28 February 2021?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

Forum|alt.badge.img+2
  • November 27, 2020

@ebygomm​ It seems pretty common that one year from 29 February 2020 is 28 February 2021. So think you'd have to make an exception for leap years and add an extra day if you need the next year to start at 1st March 2021 instead. If you calculate the interval between 29 February 2020 & 1st March 2021 it gives you P1Y1D