Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #445 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

format_currency doesn't format correctly

Reported by: Jeff Watkins Owned by: anonymous
Priority: normal Milestone: 0.9
Component: TurboGears Version:
Severity: major Keywords:
Cc:

Description

${format_currency(2)} ==> 2.00 ${format_currency(20)} ==> 2,0.00 ${format_currency(200)} ==> 2,00.00 ${format_currency(2000)} ==> 2,000.00 ${format_currency(20000)} ==> 2,000,0.00

Change History

comment:1 Changed 13 years ago by anonymous

  • Status changed from new to closed
  • Resolution set to fixed

The issue of numerical formatting (placing of commas correctly) is now fixed and I have updated the tests for this to include smaller numbers.

format_currency does not display the currency symbol, it's just a shorthand for format_decimal(num_places=2). It is left to the developer to decide which currency to use (for example, a US site may still have prices in US dollars even when displaying information in German).

Note: See TracTickets for help on using tickets.