Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes the null exception on date humanize #193

Merged
merged 2 commits into from
Apr 12, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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; }
}
}
}