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

Insert numbers of days in a field and calculate next date excluding Weekend days (Saturday, Sunday)

Community Beginner ,
Mar 04, 2016 Mar 04, 2016

Hi, I have three fields like this:

"Date field", "Numbers of Day"s and "Calculate Date fields"

I like to calculate like this:    Date field + Numbers of Days = Calculate Date (Excluding Weekend days)

TOPICS
Acrobat SDK and JavaScript , Windows
489
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 ,
Mar 04, 2016 Mar 04, 2016

This requires quite a complex script. There's a lot of information about this subject here:

https://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascript

https://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascript-part-2

https://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascript-part-3

If you're not interested in developing this script yourself another option is to use one that was already developed for this purpose and just apply the code to your fields. For example, I've developed a script that allows you to do just that, and it even has the option of ignoring weekends and even holidays when adding the days to the original date. You can purchase it from here: Custom-made Adobe Scripts: Acrobat -- Apply Automatic Date Calculation

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 ,
Mar 04, 2016 Mar 04, 2016

There is not any thing, which i required.

I need a script that Add numbers of days into a date and resultant should be date excluding weekends days

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
LEGEND ,
Mar 06, 2016 Mar 06, 2016
LATEST

The script you want will need to written for your specific form. The linked articles show one way to perform date arithmetic and that is covered in Part 1 of Thom Parker's series about date and time calculations. You might not want to use the number of milliseconds, so consider using the getDate() and setDate methods documented in the MDN JavaScript Reference.

This is a User 2 User forum and the vast majority of responders are providing help for free. They have done similar task to yours and we have all learned form Thom Parker's articles. You might want to reconsider your stance about them.

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