> Customer would now like the date to
> appear as the Month and Day only (no
> year) but with its appropriate ending
> (i.e. "nd" for "2nd", "th" for "4th"

You're talking about adding an ordinal to the number.  Here's a
handy-dandy function to do that:

   function GetOrdinal(n)
   {
     var m = n % 10;
     return "" + n +
         ["th","st","nd","rd"][(!(((m)>3) ||
             (Math.floor(n%100/10)==1)))*m];
   }

Put the function in your JavaScript Globals, or right in your rule.
Then you can do something like this:

   return FormatDate(MyDate, "ld, lm d") +
             GetOrdinal(GetDayOfMonth(MyDate));

This has come up on the forum before; don't hesitate to check the
archives.  But maybe we should add the GetOrdinal function to
Builtins.js in a future release.  Or maybe even add a format specifier
to FormatDate to do this.

Dan


--
Users of FusionPro Desktop have unlimited free email support. Contact Printable 
Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--
Note:  All e-mail sent to or from this address will be received or otherwise 
recorded by the e-mail recipients of this forum. It is subject to archival, 
monitoring or review by, and/or disclosure to someone other than the recipient. 
Our privacy policy is posted on www.printplanet.com
--

Reply via email to