Commit 840c1ddb authored by Sean Hammond's avatar Sean Hammond

Clarify a comment

Clarify why we don't just call Date.toLocaleDateString().
parent b9380197
......@@ -51,6 +51,8 @@ var formatters = {};
*
* This is a wrapper for Intl.DateTimeFormat.format() that caches
* DateTimeFormat instances because they're expensive to create.
* Calling Date.toLocaleDateString() lots of times is also expensive in some
* browsers as it appears to create a new formatter for each call.
*
* @returns {string}
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment