Money
مقداری پول را با نوع ارز آن نشان می دهد.
نمایندگی JSON |
---|
{
"currencyCode": string,
"units": string,
"nanos": integer
} |
فیلدها |
---|
currencyCode | string کد ارز سه حرفی تعریف شده در ISO 4217. |
units | string ( int64 format) کل واحدهای مقدار. به عنوان مثال، اگر currencyCode "USD" باشد، 1 واحد یک دلار آمریکا است. |
nanos | integer تعداد نانو (10^-9) واحد مقدار. مقدار باید بین -999,999,999 و +999,999,999 باشد. اگر units مثبت باشد، nanos باید مثبت یا صفر باشد. اگر units صفر باشد، nanos می تواند مثبت، صفر یا منفی باشد. اگر units منفی باشد، nanos باید منفی یا صفر باشد. به عنوان مثال 1.75-$ به صورت units =-1 و nanos =-750,000,000 نشان داده می شود. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-04 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-04 بهوقت ساعت هماهنگ جهانی."],[[["Money is represented using a JSON object with currency code, whole units, and nano units."],["Currency is specified by a three-letter ISO 4217 code like \"USD\"."],["The `units` field stores the whole currency units, while `nanos` stores fractional units (10^-9)."],["`nanos` value must be within -999,999,999 to +999,999,999 and its sign must align with the sign of `units`."]]],["The core content defines a JSON structure for representing monetary amounts. It includes three fields: `currencyCode` (a string for the three-letter currency code), `units` (a string representing whole units of the currency), and `nanos` (an integer for the fractional nano-units). The `nanos` value must adhere to constraints based on the sign of `units` and is used for precision in amounts. The amount value is based on those three elements.\n"]]