From 3bd2a9c577704b899eea7a225f84718d1f0eb4f6 Mon Sep 17 00:00:00 2001 From: MehdiK Date: Sat, 12 Apr 2014 09:07:51 +0430 Subject: [PATCH 1/2] fixes the null exception on date humanize --- src/Humanizer/Configuration/Configurator.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Humanizer/Configuration/Configurator.cs b/src/Humanizer/Configuration/Configurator.cs index 437e8ca83..fbf52af16 100644 --- a/src/Humanizer/Configuration/Configurator.cs +++ b/src/Humanizer/Configuration/Configurator.cs @@ -22,6 +22,8 @@ public static class Configurator { "pl", () => new CzechSlovakPolishFormatter() } }; + private static IDateTimeHumanizeStrategy _dateTimeHumanizeStrategy = new DefaultDateTimeHumanizeStrategy(); + /// /// The formatter to be used /// @@ -37,6 +39,10 @@ public static IFormatter Formatter } } - public static IDateTimeHumanizeStrategy DateTimeHumanizeStrategy { get; set; } + public static IDateTimeHumanizeStrategy DateTimeHumanizeStrategy + { + get { return _dateTimeHumanizeStrategy; } + set { _dateTimeHumanizeStrategy = value; } + } } } From b9b15acf0d68d3ae8e8a4ec54d20865e0962d636 Mon Sep 17 00:00:00 2001 From: MehdiK Date: Sat, 12 Apr 2014 09:10:35 +0430 Subject: [PATCH 2/2] added the PR to release notes --- release_notes.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/release_notes.md b/release_notes.md index 314c35d10..8cf4bc5d2 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,5 +1,8 @@ ###In Development - - [#186](https://github.com/Mehdik/Humanizer/pull/186): Refactored 'ToOrdinalWords` to use existing `NumberToWordsExtension` to prepare for Ordinal localization. + - [#186](https://github.com/Mehdik/Humanizer/pull/186): Refactored 'ToOrdinalWords` to use existing `NumberToWordsExtension` to prepare for Ordinal localization +[Commits](https://github.com/MehdiK/Humanizer/compare/v1.20.2...master) + - [#193](https://github.com/Mehdik/Humanizer/pull/193): Fixed the NullException error on DateTime.Humanize + [Commits](https://github.com/MehdiK/Humanizer/compare/v1.20.2...master) ###v1.20.2 - 2014-04-11