These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Date Format Issue

navyvette
Registered: Mar 14 2007
Posts: 5

I am Old to acrobat, but new to Java, I am attempting to script a date that will show and print in a Jan 1st, 2nd etc format. Apparently this is not commonly done as I can find no examples. I would appreciate any help you can provide with this issue. Thank you.
 
Mark

Mark USN(ret)

Any man who may be asked in this century, what he did to make his life Worthwhile, can respond with a good deal of Pride and Satisfaction, "I served in the United States Navy". JFK

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This particular formatting is not covered by the standard date formatting symbols because it is irregular, i.e. the "st", "nd", "th". However, it's easy enough to use one of the regular date formats and then modify the resulting text using a regular expression.

Look at this series of articles to learn about date handling in JavaScript:

[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/date_time_part1/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/date_time_part1/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script