SOLVED

Re: Velocity Script Issue

Go to solution
SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity Script Issue

Maybe edit your earlier post to delete the unhighlighted version?

(I'm very sensitive to unhighlighted code, as I literally can't read it.)

Ashley_D_Innoce
Level 2

Re: Velocity Script Issue

Understandable, I highlighted my earlier post too

SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity Script Issue

I added this snippet to my blog post as well, so it'll be there for future threads.

SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity Script Issue

You shouldn't need any conditionals, just a map (or, simpler, an array) of days-of-month to ordinal indicator. Then interpolate

    ’${indicators[$calNow.get($calConst.DAY_OF_MONTH)]}’

into the output format.

It should be noted that this is an extremely US-English-flavored variant of such a solution. There's no built-in localized version of this because the permutations are too broad.

Ashley_D_Innoce
Level 2

Re: Velocity Script Issue

Thanks for the help Sanford. I'm trying this out to see if I can make it work.