【问题标题】:smarty math returns comma instead of pointsmarty math 返回逗号而不是点
【发布时间】:2015-09-12 11:18:29
【问题描述】:

在 Smarty 中执行此操作

{math equation=1.1+0.7 format="%.2f"}

我得到一个以逗号分隔的小数点 1,80 的结果

不知道如何获得 1.80 的值。

非常感谢。

【问题讨论】:

    标签: decimalformat smarty3


    【解决方案1】:

    我找到的唯一解决方案是将逗号替换为点。

    math|replace:",":"."
    

    希望它对某人有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-28
      • 2016-07-01
      • 2012-06-09
      • 1970-01-01
      • 2022-01-11
      相关资源
      最近更新 更多