YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub

YUI 2.x

Ticket #2527771 (closed enhancement)

Reporter


Luke Smith
Opened: 03/6/09
Last modified: 05/20/10
Status: closed
Type: enhancement
Resolution: fixed

Owner


Jenny Han Donnelly
Target Release: 2.8.0
Priority: P3 (normal)
Summary: Potential replacement for YAHOO.util.Number.format
Description:

In response to a ydn-js poster asking about custom formatting for negative numbers, I adapted a number formatting function I wrote a while ago to support a new config key negativeFormat.

The code is significantly smaller than the current production version, so may be worth using as a replacement.

http://gist.github.com/75096

Type: enhancement Observed in Version: 2.7.0
Component: DataTable Severity: S3 (normal)
Assigned To: Jenny Han Donnelly Target Release: 2.8.0
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: N/A
URL:
Test Information:

Change History

Luke Smith

YUI Developer

Posted: 03/6/09

Feel free to assign this back to me if you think it's kosher and want me to make the change.

Jenny Han Donnelly

YUI Developer

Posted: 06/19/09
  • browser changed to N/A
  • milestone changed to 2.8.0
  • status changed from new to accepted

As long as it's not slower, it's all good. Thanks.

Luke Smith

YUI Developer

Posted: 06/19/09

Added a patch to the gist to protect against an IE bug in (number).toFixed(). Namely
for n in {(-0.94, -0.5], [0.5, 0.94)} n.toFixed() returns 0 instead of -1 and 1 (in IE <= 8)

Jenny Han Donnelly

YUI Developer

Posted: 08/4/09
  • status changed from accepted to checkedin

Created commit f3a075f: [fix bug #2527771] Negative formatting support in Number.format().

George

YUI Developer

Posted: 09/14/09
  • status changed from checkedin to closed

2.8.0 has been released. All "checkedin" items are available for download in the official release. Status of "checkedin" items is being set to closed.

George

YUI Developer

Posted: 09/14/09
  • resolution changed to fixed

davidsickmiller

Posted: 05/20/10

I noticed a bug in that patch for IE and filed it as #2528976