Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Calculation Future dates with number of days

Community Beginner ,
Jan 24, 2019 Jan 24, 2019
Can someone help with script for Adobe pdf.

I got 3 text field

Start Date

Number of Months

End Date


So I want a script when i populate Start date and Number of months, automatically populate the end date


example


I enter start date= 1/12/2018

then i enter Number of months= 2

the output should be= 2/02/2019

Can someone help me on this?

TOPICS
General troubleshooting
664
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 25, 2019 Jan 25, 2019

It sounds like a simple task, but it's actually not. The tricky part is defining what "a month" means. Is it 30 calendar days? 31? Full calendar months? Why, for example, is the starting date in your example the 1st but the end date the 2nd? And what about if the starting date doesn't exist in the end month... For example, 1 month after January 31st. Is that February 28th (a full calendar month)? February 29th (if it's a leap year)? March 2nd (+30 days, if it's not a leap year)? March 3rd (+31 days, if it's not a leap year)? etc.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 25, 2019 Jan 25, 2019

I am not understanding. It’s should be calculating the full month. Example starting date the properties are set to Mm/did/yyyy and the number of month properties are set to numbers in properties. other than the script is there any calculation for this.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 26, 2019 Jan 26, 2019
LATEST

This is only possible with a script.

You didn't answer my question: What should be the result if the starting date is January 31st and you add one month to it?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines