Closed alc86 closed 8 months ago
@alc86, could you elaborate on "currently work with factor 100" please?
Do you mean that the numberFormatter and numberParser are returning incorrect values specifically for 1 and 100%?.numberFormatter({ style: "percent" })( 0.5 ) // > "50%"
.numberParser({ style: "percent" })( "50%" ) // > 0.5
Thank you @pau1tuck for asking for clarification. I think @alc86 wants to be able to pass 1 and get "1%" as output.
@alc86 that can be accomplished by dividing the input before passing it to globalize, like x/100
. That said, I don't foresee a need for globalize API to change. Let me know if you need something else or if this blocks any use case I couldn't anticipate here. Thanks
Hi,
I have recognised that the formatting and parsing currently work with factor 100. So this means value 1 is formatted to 100% and 100% is parsed to 1. Is there a possibilty to change the factor because we would like to have value 1 as 1% and 1% should be parsed to value 1.