Copy link to clipboard
Copied
Hi all! 🙂
I'm trying to populate a field with an automatic date.
Since I need different PDF's with different languages I thought an array specifying the name of the month would be an idea. Unfortunatelly I can't seem to find any solutions.
The one thread I found with f.value = util.printd("mmmm d, yyyy", newDate()); worked, but only in english 😕
has someone an idea how I could do it?
I'm using Adobe Acrobat Pro DC
thank you in advance for your help 🙂
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi,
If you write:
event.value=util.printd("date(en){MMMM}",new Date(),true);
you will get the month in English, but if you write:
event.value=util.printd("date(fr){MMMM}",new Date(),true);
you will get it in French. So if you write:
theLanguage=this.app.language.substr(0,2).toLowerCase();
event.value=util.printd("date("+theLanguage+"){MMMM}",new Date(),true);
you will get the month in the language of your Acrobat application.
https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/JS_API_AcroJS.html#language
...this is at a capital letter the same thing as:
event.value=util.printd("mmmm",new Date());
@+
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thank you so much😁 this really helped and gave me the solution to my problem 😁👏🏻🥳
Copy link to clipboard
Copied
You can use this free Date picker, it works with 28 languages:
https://www.abracadabrapdf.net/utilitaires/utilities-in-english/magicdate-picker/
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more