mirror of
https://github.com/Lissy93/dashy.git
synced 2024-12-27 10:56:20 +03:00
👔 Adds function to convery farenheight to celcius
This commit is contained in:
parent
c1607cb19b
commit
20b7a6b062
@ -145,6 +145,11 @@ export const getValueFromCss = (colorVar) => {
|
|||||||
return cssProps.getPropertyValue(`--${colorVar}`).trim();
|
return cssProps.getPropertyValue(`--${colorVar}`).trim();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Given a temperature in Fahrenheit, returns value in Celsius */
|
||||||
|
export const fahrenheitToCelsius = (fahrenheit) => {
|
||||||
|
return Math.round(((fahrenheit - 32) * 5) / 9);
|
||||||
|
};
|
||||||
|
|
||||||
/* Given a currency code, return the corresponding unicode symbol */
|
/* Given a currency code, return the corresponding unicode symbol */
|
||||||
export const findCurrencySymbol = (currencyCode) => {
|
export const findCurrencySymbol = (currencyCode) => {
|
||||||
const code = currencyCode.toUpperCase().trim();
|
const code = currencyCode.toUpperCase().trim();
|
||||||
|
Loading…
Reference in New Issue
Block a user