tracker issue : CF-4197215

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] ER for: numberFormat(number, "roman")

| View in Tracker

Status/Resolution/Reason: To Fix//EnhancementRequired

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 11/02/2016

Components: Language

Versions: 2016

Failure Type: Enhancement Request

Found In Build/Fixed In Build: CF2016_Update3 /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Win All

Vote Count: 0

This ER is for: numberFormat(number, "roman")

For possible use case, see this comment on ticket 3931678:
--------------------------------------------
cfhtmltopdfitem tag has an attribute called numberformat. Its default is numeric but it can be set to ROMAN also. Now if it is set as ROMAN and evalAtPrint is true and user has some conditional code based on pagenumbers, then that code will not work properly.
--------------------------------------------

The use case, here, is when user needs <cfhtmltopdfitem evalAtPrint="true"..> (for conditional logic in header/footer) -and- wants to display page numbers in Roman Numerals.

Currently, this throws an error: <cfhtmltopdfitem evalAtPrint="true" numberformat="LOWERCASEROMAN|UPPERCASEROMAN">

If this ER is implemented, then user could do this:
-----------
<cfhtmltopdfitem evalAtPrint="true">
<cfoutput>#uCase(numberFormat(CFHTMLTOPDF.currentPageNumber, "roman"))#</cfoutput>
</cfhtmltopdfitem>
-----------

Basically, the formatting-numbers-as-roman should've been made more general-purpose instead of baking it into a cfhtmltopdfitem attribute.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4197215

External Customer Info:
External Company:  
External Customer Name: Aaron Neff
External Customer Email:

Attachments:

Comments:

BTW, it already works on Lucee: http://trycf.com/gist/832781a2293616550590c317a2b8e3fb/lucee5?theme=monokai
Comment by External U.
1519 | November 02, 2016 08:46:54 PM GMT