SOLVED

Velocity Script Issue

Go to solution
Highlighted
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.)

Highlighted

Re: Velocity Script Issue

Understandable, I highlighted my earlier post too

Highlighted
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.

Highlighted
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.

Highlighted

Re: Velocity Script Issue

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