Skip to content

Conversation

@angularsen
Copy link
Owner

@angularsen angularsen commented Jul 8, 2024

Fixes #1115

Change from L to l in unit abbreviations for liters, to be consistent in library and to follow SI Unit System conventions.

Note:

  • Parsing is backwards compatible, since parsing unit abbreviations has fallback to case insensitive as long as there is no ambiguity. E.g. Volume.Parse("10 L") and Volume.Parse("10 l") both work.
  • To avoid breaking backwards compatibility, we keep liter instead of litre when naming units.

Also updated wiki:
https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit#abbreviation-naming-conventions

Changed units

  • Density.GramPerLiter + prefixes
  • FuelEfficiency.LiterPer100Kilometers
  • FuelEfficiency.KilometerPerLiter
  • MassConcentration.GramPerMicroliter
  • MassConcentration.GramPerMilliliter
  • MassConcentration.GramPerDeciliter
  • MassConcentration.GramPerLiter
  • Molarity.MolePerLiter
  • VolumeConcentration.LitersPerLiter
  • VolumeConcentration.LitersPerMililiter
  • VolumeFlow.LiterPerSecond
  • VolumeFlow.LiterPerMinute
  • VolumeFlow.LiterPerHour
  • VolumeFlow.LiterPerDay

Fixes #1115

Change from `L` to `l` in unit abbreviations for liters.

- `Density.GramPerLiter` + prefixes
- `FuelEfficiency.LiterPer100Kilometers`
- `FuelEfficiency.KilometerPerLiter`
- `MassConcentration.GramPerMicroliter`
- `MassConcentration.GramPerMilliliter`
- `MassConcentration.GramPerDeciliter`
- `MassConcentration.GramPerLiter`
- `Molarity.MolePerLiter`
- `VolumeConcentration.LitersPerLiter`
- `VolumeConcentration.LitersPerMililiter`
- `VolumeFlow.LiterPerSecond`
- `VolumeFlow.LiterPerMinute`
- `VolumeFlow.LiterPerHour`
- `VolumeFlow.LiterPerDay`
@angularsen angularsen merged commit ea9d006 into release/v6 Jul 8, 2024
@angularsen angularsen deleted the agl/standardize-liter branch July 8, 2024 13:00
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

Successfully merging this pull request may close these issues.

2 participants