Changes between Initial Version and Version 1 of Ticket #17662, comment 11


Ignore:
Timestamp:
Nov 16, 2020, 6:10:10 AM (4 years ago)
Author:
Johannes Maron

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17662, comment 11

    initial v1  
    11I am taking the liberty to revisit this ticket and to reopen the discussion.
    22
    3 I believe a lot has changed this implementing a percent filter was initially dismissed. We are perfectly capable to render number via `floatformat`. Shifting the point/comma by two places and adding a `&percent;` does not seem unreachable.
     3I believe a lot has changed this implementing a percent filter was initially dismissed. We are perfectly capable to render number via `floatformat`. Shifting the point/comma by two places and adding a `%` does not seem unreachable.
    44
    5 IMHO we don't need to solve all possible cases here, but the most common one. A value or rather ratio between 0 to 1 that is better contextualized in percent. Thousand-separators seem unnecessary, since in most cases values above 1 would usually not be displayed as percent unless you love adding aditional zeros.
     5IMHO we don't need to solve all possible cases here, but the most common one. A value or rather ratio between 0 and 1 that is better contextualized in percent. Thousand-separators seem unnecessary, since in most cases values above 1 would usually not be displayed as percent unless you love adding additional zeros.
    66
    77I would propose a filter as simple as `flaotformat` but with a percentage sign and a fix decimal shift.
     
    1313>>> 0.023809523809523808
    1414my_value|percent:2 # in a template
    15 >>> "2.38 &percent;"
    16 >>> "2,38 &percent;" # if you use comma
     15>>> "2.38 %"
     16>>> "2,38 %" # if you use comma
    1717}}}
Back to Top