You need to sign in to do that
Don't have an account?
Chad Kovac
Using this code, I can get the day of the month but I need to say: 2nd, not 2 and 3rd not 3, etc.,
Someone on Stack Exchange recommended this Javascript embedded in my page:
How can I output the current day with ND RD or TH in Visual Force?
Using this code, I can get the day of the month but I need to say: 2nd, not 2 and 3rd not 3, etc.,
<apex:outputText value="{0, date, D}"><apex:param value="{!Date()}" /></apex:outputText>
Someone on Stack Exchange recommended this Javascript embedded in my page:
<Script Language="JavaScript"> public static String getDayOfMonthSuffix(Integer n) { if (n == null) { return ''; } if (n >= 11 && n <= 13) { return 'th'; } Integer modResult = Math.mod(n, 10); if (modResult == 1) { return 'st'; } else if (modResult == 2) { return 'nd'; } else if (modResult == 3) { return 'rd'; } else { return 'th'; } }</script> html starting... IN WITNESS WHEREOF, the Parties have executed this Confidentiality Agreement under seal as of this <Script Language="JavaScript"> getDayOfMonthSuffix(getUTCDate()); </Script> day of .... more html
Something like the following:
If you get really ambitious, you could throw the text in a custom label for formatting / translatting as well.