You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is already native helper support for google.protobuf.Timestamp, and while google.type.* aren't WKTs, they're pretty close. It should be pretty simple to generate similar helpers for money.
// Create our number formatter.varformatter=newIntl.NumberFormat('en-US',{style: 'currency',currency: 'USD',// These options are needed to round to whole numbers if that's what you want.//minimumFractionDigits: 0, // (this suffices for whole numbers, but will print 2500.10 as $2,500.1)//maximumFractionDigits: 0, // (causes 2500.99 to be printed as $2,501)});formatter.format(2500);/* $2,500.00 */
There is already native helper support for
google.protobuf.Timestamp
, and whilegoogle.type.*
aren't WKTs, they're pretty close. It should be pretty simple to generate similar helpers for money.code from: https://stackoverflow.com/a/16233919/1691542
cc @tannerlinsley
The text was updated successfully, but these errors were encountered: