Closed
Description
First of all, thank you for making this library open-source.
In my energy conversion app, I am using the function Energy.TryParseUnit()
.
I had already encountered not recognized abbreviations that I could fix using MapUnitToDefaultAbbreviation
, for example:
UnitAbbreviationsCache.Default.MapUnitToDefaultAbbreviation(VolumeUnit.CubicKilometer, "bcm");
But now I have encountered unit PetaJoule "PJ" and the parsing is throwing an error. I have tried something like the following but it does not work
UnitAbbreviationsCache.Default.MapUnitToDefaultAbbreviation(new Energy(1000, EnergyUnit.Gigajoule), "joule");
Any help would be welcome.
Thank you