diff --git a/src/Humanizer/Localisation/Formatters/RomanianFormatter.cs b/src/Humanizer/Localisation/Formatters/RomanianFormatter.cs index 1b8294096..774593842 100644 --- a/src/Humanizer/Localisation/Formatters/RomanianFormatter.cs +++ b/src/Humanizer/Localisation/Formatters/RomanianFormatter.cs @@ -1,29 +1,28 @@ -namespace Humanizer +namespace Humanizer; + +class RomanianFormatter() : + DefaultFormatter("ro") { - class RomanianFormatter() : - DefaultFormatter("ro") - { - const int PrepositionIndicatingDecimals = 2; - const int MaxNumeralWithNoPreposition = 19; - const int MinNumeralWithNoPreposition = 1; - const string UnitPreposition = " de"; + const int PrepositionIndicatingDecimals = 2; + const int MaxNumeralWithNoPreposition = 19; + const int MinNumeralWithNoPreposition = 1; + const string UnitPreposition = " de"; - static readonly double Divider = Math.Pow(10, PrepositionIndicatingDecimals); + static readonly double Divider = Math.Pow(10, PrepositionIndicatingDecimals); - protected override string Format(TimeUnit unit, string resourceKey, int number, bool toWords = false) - { - var format = Resources.GetResource(GetResourceKey(resourceKey, number), Culture); - var preposition = ShouldUsePreposition(number) - ? UnitPreposition - : string.Empty; + protected override string Format(TimeUnit unit, string resourceKey, int number, bool toWords = false) + { + var format = Resources.GetResource(GetResourceKey(resourceKey, number), Culture); + var preposition = ShouldUsePreposition(number) + ? UnitPreposition + : string.Empty; - return string.Format(format, number, preposition); - } + return string.Format(format, number, preposition); + } - static bool ShouldUsePreposition(int number) - { - var prepositionIndicatingNumeral = Math.Abs(number % Divider); - return prepositionIndicatingNumeral is < MinNumeralWithNoPreposition or > MaxNumeralWithNoPreposition; - } + static bool ShouldUsePreposition(int number) + { + var prepositionIndicatingNumeral = Math.Abs(number % Divider); + return prepositionIndicatingNumeral is < MinNumeralWithNoPreposition or > MaxNumeralWithNoPreposition; } -} +} \ No newline at end of file