This way of enumerating numbers is known as "Ordinal". There are many was to script this. What works for web JavaScript can easily work with little modification in Acrobat forms. This type of date format is usually used in legal forms.
You should be able to search the forums for "legal date" or "ordinal" and find the post.
I found a JavaScript function that can take as input a number and returns the number with the ordinal suffix. This allows you to create any number of date formats.
This function is not limited to just dates bat can be used to add the ordinal suffix to any number.
The function:
function ordinal_suffix_of(I)I
{
var j = i % 10, // 10's remainder
k = i % 100, //100's remainder
cSuffix = "th"; // default suffix result
if (j == 1 && k != 11) {
// not 11;
cSuffix = "st";
}
if (j == 2 && k != 12) {
// not 12;
cSuffix = "nd";
}
if (j == 3 && k != 13) {
// not 13;
cSuffix = "rd";
}
return i + cSuffix;
} // end ordial_suffix function;
I would place this code in the document level script location and then call it as needed in the various fields.
I would enter the date in different field that would not print and then have the formatted date in a different field. You should know how to split the inputted date string into the month, date, and year parts and then rearrange them as needed.
You can test the code using the Acrobat JavaScript console:
function ordinal_suffix_of(i)
{
var j = i % 10, // 10's remainder
k = i % 100, //100's remainder
cSuffix = "th"; // default suffix result
if (j == 1 && k != 11) {
// not 11;
cSuffix = "st";
}
if (j == 2 && k != 12) {
// not 12;
cSuffix = "nd";
}
if (j == 3 && k != 13) {
// not 13;
cSuffix = "rd";
}
return i + cSuffix;
} // end ordial_suffix function;
function MyDateFormat(cFormat, cDate)
{
var oDate = util.scand(cFormat, cDate);
if(oDate == null)
{app.alert("Invalid date provided", 1, 0);
}
else
{
return util.printd("mmmm", oDate) +" " + ordinal_suffix_of(oDate.getDate()) + ", " + util.printd("yyyy", oDate);
}
}
var dateInput = "13/05/2015"; // inputted date value;
var cFormattedDate = MyDateFormat("d/mm/yyyy", dateInput); // formatted string for date;
console.println(cFormattedDate);
dateInput = "23/5/2015";
console.println(MyDateFormat("d/mm/yyyy", dateInput));
dateInput = "19/07/2015";
console.println(MyDateFormat("d/mm/yyyy", dateInput));
dateInput = "9/07/2015";
console.println(MyDateFormat("d/mm/yyyy", dateInput));