Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using °C and °F #87

Open
iandol opened this issue Jul 20, 2021 · 2 comments
Open

Using °C and °F #87

iandol opened this issue Jul 20, 2021 · 2 comments

Comments

@iandol
Copy link

iandol commented Jul 20, 2021

Hi @deanishe, perhaps I'm doing something wrong, but looking at Pint's units I should be able to use °C and °F to reference degree_Celsius and degree_Fahrenheit:

https://github.com/hgrecco/pint/blob/master/pint/default_en.txt#L198

alfred-convert is however telling me they are unknown units? Perhaps I'm misunderstanding how the units and aliases work? An option to be able to ignore case would also be nice (degC or degc). Thanks for a great workflow!!!!!

@CaptainMalReynolds
Copy link

What I did is added this
f = 5 / 9 * kelvin; offset: 233.15 + 200 / 9 = °F = fahrenheit = degF = degreeF c = kelvin; offset: 273.15 = °C = celsius = degC = degreeC
in the unit_definitions.txt and now I can do like conv 100 f c

@alezvic
Copy link

alezvic commented Jun 22, 2022

What I did is added this f = 5 / 9 * kelvin; offset: 233.15 + 200 / 9 = °F = fahrenheit = degF = degreeF c = kelvin; offset: 273.15 = °C = celsius = degC = degreeC in the unit_definitions.txt and now I can do like conv 100 f c

In the case of @iandol, that'd be:

°F = 5 / 9 * kelvin; offset: 233.15 + 200 / 9 = f = fahrenheit = degF = degreeF

°C = kelvin; offset: 273.15 = c = celsius = degC = degreeC

It worked for me. I don't know why it doesn't work by default but that workaround works. Consider a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants