Skip to content

Commit

Permalink
Merge pull request #193 from MehdiK/fixing-date-humanize
Browse files Browse the repository at this point in the history
fixes the null exception on date humanize
  • Loading branch information
MehdiK committed Apr 12, 2014
2 parents 3c07ac9 + b9b15ac commit db3bfa7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion release_notes.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 7 additions & 1 deletion src/Humanizer/Configuration/Configurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public static class Configurator
{ "pl", () => new CzechSlovakPolishFormatter() }
};

private static IDateTimeHumanizeStrategy _dateTimeHumanizeStrategy = new DefaultDateTimeHumanizeStrategy();

/// <summary>
/// The formatter to be used
/// </summary>
Expand All @@ -37,6 +39,10 @@ public static IFormatter Formatter
}
}

public static IDateTimeHumanizeStrategy DateTimeHumanizeStrategy { get; set; }
public static IDateTimeHumanizeStrategy DateTimeHumanizeStrategy
{
get { return _dateTimeHumanizeStrategy; }
set { _dateTimeHumanizeStrategy = value; }
}
}
}

0 comments on commit db3bfa7

Please sign in to comment.