标签: currency

显示国际货币

全球公认的国际货币显示方式是什么?

\n\n

例如:20 美元、20 美元、20 美元(美国)、\xe2\x82\xac20、20\xe2\x82\xac 等?

\n\n

如果有多种显示每种货币的方法,那么显示货币的通用方法是什么?

\n

globalization currency internationalization

2
推荐指数
1
解决办法
7148
查看次数

Rails 缓存与 Money gem (eu_central_bank)

我发现了 Money gem 的这个附加组件,它从 ECB 欧洲中央银行更新(每 24 小时更新一次汇率),但我不确定应该如何在使用多种货币的 Rails 应用程序中进行缓存。

http://github.com/RubyMoney/eu_central_bank

eu_bank ||= EuCentralBank.new
eu_bank.update_rates
#Rails.cache.fetch('rates', :expires_in => 24.hours) { eu_bank.update_rates }
rate = eu_bank.exchange_with(Money.new(100, session[:currency]), "USD").to_f
Run Code Online (Sandbox Code Playgroud)

它有一个功能可以将费率写入某个文件......但我也不确定这就是我想要的。我还使用具有只读文件系统的heroku。

eu_bank.save_rates("/some/file/location/exchange_rates.xml")
Run Code Online (Sandbox Code Playgroud)

我也找不到任何方法来检查该物体的年龄。我只是想知道每 24 小时加载一次并持续用于我的整个 Rails 应用程序的最佳选择。有什么指点吗?

ruby memcached caching currency ruby-on-rails

2
推荐指数
1
解决办法
2476
查看次数

en-IN 语言环境不适用于角货币管道

来自维基百科

印度编号系统使用与国际规范不同的分隔符。与国际系统中将数字按三位数分组不同,它将最右边的三位数字分组在一起(直到百位),然后按一组两位数字分组。因此,一万亿将被写为 10,00,00,00,00,000。

toLocaleStringJavaScript 的函数以正确的en-IN语言环境格式返回。

(123456789).toLocaleString('en-IN', {
    style: 'currency',
    currency: 'INR',
    minimumFractionDigits: 2,
    maximumFractionDigits: 2
})  //  ? 12,34,56,789.00
Run Code Online (Sandbox Code Playgroud)

但是 Angular 的货币管道不会为en-IN语言环境返回相同的输出。我需要创建自定义管道吗?

{{ 123456789 | currency : 'INR' : 'symbol': '1.2-2' : 'en-IN' }}
<!-- ?123,456,789.00 -->
Run Code Online (Sandbox Code Playgroud)

javascript currency angular

2
推荐指数
1
解决办法
865
查看次数

组件中的角货币管

我正在尝试在 component.ts 文件中使用此货币管道。但不会产生相同的结果。

{{ money |currency: 'EUR': 'symbol' : '' : locale}}
this.currencyPipe.transform(money, 'EUR', '', true);
Run Code Online (Sandbox Code Playgroud)

currency angular-pipe angular

2
推荐指数
1
解决办法
1万
查看次数

excelJs 日元的货币格式

对于excelJs,numFmt对于美元来说效果很好,但是无法弄清楚如何格式化日元的数字。

\n\n

有效的美元格式:\'$#,##0.00\'

\n\n
// works just fine\n//\nstyle : {\n    numFmt : \'$#,##0.00\'\n}\n
Run Code Online (Sandbox Code Playgroud)\n\n

我尝试过的日元格式:\'\xc2\xa5#,##0.00\' / \'\xc2\xa5#,##0\'但不成功

\n\n
// doesn\'t work\n//\nstyle : {\n    numFmt : \'\xc2\xa5#,##0.00\'\n}\n\nstyle : {\n    numFmt : \'\xc2\xa5#,##0\'\n}\n
Run Code Online (Sandbox Code Playgroud)\n\n

当我尝试将单元格设置为日元格式时,我总是从电子表格中收到错误,无法导入数据格式。提前致谢!

\n

javascript formatting currency exceljs

2
推荐指数
1
解决办法
1862
查看次数

使用“NumberFormat”类 Java 进行国家/地区货币格式化

我目前正在执行一项任务,涉及获取代表一笔钱的双精度数字,并使用 NumberFormat 类的 getCurrencyInstance 方法将其转换为美国、印度、中国和法国的货币格式。

\n

输入:

\n
A single double-precision number denoting 'payment'\n
Run Code Online (Sandbox Code Playgroud)\n

输出:

\n
On the first line, print US: 'u' where 'u' is 'payment' formatted for US currency.\nOn the second line, print India: 'i' where 'i' is 'payment' formatted for the Indian currency.\nOn the third line, print China: 'c' where 'c' is 'payment' formatted for Chinese currency.\nOn the fourth line, print France: 'f' where 'f' is formatted for French currency.\n
Run Code Online (Sandbox Code Playgroud)\n

输入示例:

\n
12324.134\n
Run Code Online (Sandbox Code Playgroud)\n

示例输出: …

java printing currency class currency-formatting

2
推荐指数
1
解决办法
253
查看次数

ASP.Net:为string.Format()设置正确的货币设置

在我正在使用的ASP.Net网站中

String.Format("{0:C}", param)  
Run Code Online (Sandbox Code Playgroud)

格式化货币值.在我的本地机器上这很好用,但是当将网站部署到服务器时,输出从€切换到$.

显然服务器有不同的文化设置,是否有一种简单的方法来改变这个应用程序?(无法直接访问服务器设置)

我可以更改web.config条目吗?

c# asp.net culture currency string-formatting

1
推荐指数
1
解决办法
4939
查看次数

贝宝金额货币发行

我正在尝试将PayPal实施到我们的网站中。我使用cURL与PayPal的Express Checkout API进行交互。该网站本质上是德语的,因此付款将以欧元结算。

我执行了cURL,API返回了一个错误。我发现我$price是导致错误的原因。

默认情况下,$price = 56,85使用这些值,PayPal的API返回错误。但是,如果将其更改为$price = 56.85API,则会成功。

我可以简单地使用str_replace逗号替换句点。但是让我担心的是产品的价格。我正在用欧元交易。

有谁在乎解释我该如何处理这个问题?

php api currency paypal

1
推荐指数
1
解决办法
975
查看次数

使用PHP的货币转换器

我是PHP的新手所以我不确定我做错了什么,但似乎只有最后一句如果声明正在执行,无论我选择哪种货币,美元兑换美元.

我需要这样做才能转换我选择的FROM和TO货币,转换会显示在amount_output框中.并且我输入的货币和挂载仍保留在结果中而不会重置.

任何帮助它非常感谢.

<?php                
$amount_input = filter_input(INPUT_POST, 'amount_input');
$currency1 = filter_input(INPUT_POST, 'currency1');
$currency2 = filter_input(INPUT_POST, 'currency2');

if ($currency1="CAD" AND $currency2="CAD")
{
    $amount_output = $amount_input*1.0;
}

if ($currency1="CAD" AND $currency2="EUR")
{
    $amount_output = $amount_input*0.624514066;
}       

if ($currency1="CAD" AND $currency2="GBP")
{
    $amount_output = $amount_input*0.588714763;
}       

if ($currency1="CAD" AND $currency2="USD")
{
    $amount_output = $amount_input*0.810307;
}       
if ($currency1="EUR" AND $currency2="CAD")
{
    $amount_output = $amount_input*1.601244959;
}

if ($currency1="EUR" AND $currency2="EUR")
{
    $amount_output = $amount_input*1.0;
}       

if ($currency1="EUR" AND $currency2="GBP")
{
    $amount_output = $amount_input*0.942676548;
}       

if …
Run Code Online (Sandbox Code Playgroud)

php currency converter calculator

1
推荐指数
1
解决办法
1万
查看次数

使用EPPlus时,将格式化值作为货币类型插入

我正在使用格式:

type ="$ ###,###,## 0.00"

用于货币并将格式类型分配给工作表单元格

例如. wrkSheet.Cells[0].Style.Numberformat.Format = formatType;

但是这是在excel中作为文本类型插入的.我希望将其作为货币或数字插入,以便继续对插入的值(排序,总和等)进行分析.

目前,因为它是文本类型验证不正确.有没有办法强制可以插入格式化值的类型?

format currency epplus

1
推荐指数
2
解决办法
1万
查看次数