FreeMarker - remove a comma from milliseconds

Using FreeMarker, I want to display the date in milliseconds:

${mydate?long}

but I get as millisecond separated comma output:

524,354,400,000

is there a built-in function in freemarker to remove the comma?

thanks

+4
source share
2 answers

It looks like from version 2.3.17you can use:

${myDate?long?c}

http://sourceforge.net/p/freemarker/feature-requests/72/

+9
source

Alternatively, you can write this directive on your Freemarker template:

<#setting number_format="computer">

This will remove all commas from the numbers.

This is great for Freemarker 2.3.23

More information about these directives can be found here:

http://freemarker.org/docs/ref_directive_setting.html

+3

Source: https://habr.com/ru/post/1525413/


All Articles