|
3 | 3 | // |
4 | 4 | // FILE: currency.h |
5 | 5 | // AUTHOR: Rob Tillaart |
6 | | -// VERSION: 0.1.1 |
| 6 | +// VERSION: 0.1.2 |
7 | 7 | // PURPOSE: Currency library for Arduino |
8 | 8 | // URL: https://github.com/RobTillaart/Currency |
9 | 9 |
|
10 | 10 | // HISTORY |
11 | 11 | // 0.1.0 2021-02-27 initial version |
12 | 12 | // 0.1.1 2021-05-27 fix library.properties |
| 13 | +// 0.1.2 2021-10-20 update build-CI + badges |
| 14 | +// added pound, renamed roubles |
| 15 | +// |
13 | 16 |
|
14 | 17 |
|
15 | 18 | #include "Arduino.h" |
16 | 19 |
|
17 | 20 |
|
18 | | -#define CURRENCY_VERSION (F("0.1.1")) |
| 21 | +#define CURRENCY_VERSION (F("0.1.2")) |
19 | 22 |
|
20 | 23 |
|
21 | 24 | // TODO |
@@ -111,21 +114,24 @@ char * currency64(int64_t value, int decimals, char dsep, char tsep, char sym) |
111 | 114 | char * bitcoin(int32_t value) { return currency(value, 6, '.', ',', 'B'); } |
112 | 115 | char * dollar(int32_t value) { return currency(value, 2, '.', ',', '$'); } |
113 | 116 | char * euro(int32_t value) { return currency(value, 2, ',', '.', 'E'); } |
114 | | -char * roebel(int32_t value) { return currency(value, 2, ',', '.', 'P'); } |
| 117 | +char * pound(int32_t value) { return currency(value, 2, ',', '.', 'L'); } |
| 118 | +char * roubles(int32_t value) { return currency(value, 2, ',', '.', 'P'); } |
115 | 119 | char * yen(int32_t value) { return currency(value, 2, '.', ',', 'Y'); } |
116 | 120 | char * yuan(int32_t value) { return currency(value, 2, '.', ',', 'R'); } |
117 | 121 |
|
118 | 122 | char * bitcoin64(int64_t value) { return currency64(value, 6, '.', ',', 'B'); } |
119 | 123 | char * dollar64(int64_t value) { return currency64(value, 2, '.', ',', '$'); } |
120 | 124 | char * euro64(int64_t value) { return currency64(value, 2, ',', '.', 'E'); } |
121 | | -char * roebel64(int64_t value) { return currency64(value, 2, ',', '.', 'P'); } |
| 125 | +char * pound64(int64_t value) { return currency64(value, 2, ',', '.', 'L'); } |
| 126 | +char * roubles64(int64_t value) { return currency64(value, 2, ',', '.', 'P'); } |
122 | 127 | char * yen64(int64_t value) { return currency64(value, 2, '.', ',', 'Y'); } |
123 | 128 | char * yuan64(int64_t value) { return currency64(value, 2, '.', ',', 'R'); } |
124 | 129 |
|
125 | 130 | char * bitcoinf(double value) { return currency64(round(value * 1000000), 6, '.', ',', 'B'); } |
126 | 131 | char * dollarf(double value) { return currency64(round(value * 100), 2, '.', ',', '$'); } |
127 | 132 | char * eurof(double value) { return currency64(round(value * 100), 2, ',', '.', 'E'); } |
128 | | -char * roebelf(double value) { return currency64(round(value * 100), 2, ',', '.', 'P'); } |
| 133 | +char * poundf(double value) { return currency64(round(value * 100), 2, ',', '.', 'L'); } |
| 134 | +char * roublesf(double value) { return currency64(round(value * 100), 2, ',', '.', 'P'); } |
129 | 135 | char * yenf(double value) { return currency64(round(value * 100), 2, '.', ',', 'Y'); } |
130 | 136 | char * yuanf(double value) { return currency64(round(value * 100), 2, '.', ',', 'R'); } |
131 | 137 |
|
|
0 commit comments