diff --git a/zaaReloaded2/Formatter/TimePointFormatter.cs b/zaaReloaded2/Formatter/TimePointFormatter.cs
index ab5ba9b..da8b41e 100755
--- a/zaaReloaded2/Formatter/TimePointFormatter.cs
+++ b/zaaReloaded2/Formatter/TimePointFormatter.cs
@@ -30,14 +30,36 @@ namespace zaaReloaded2.Formatter
{
#region Static methods
+ ///
+ /// Builds a header paragraph from a Date,
+ /// but only if the Date structure has a value.
+ ///
public static string DateHeader(DateTime date)
{
- return FormatHeader(date.ToShortDateString());
+ if (date != _nullTimeStamp.Date)
+ {
+ return FormatHeader(date.ToShortDateString());
+ }
+ else
+ {
+ return String.Empty;
+ }
}
+ ///
+ /// Builds a header paragraph from a DateTime structure,
+ /// but only if the DateTime structure has a value.
+ ///
public static string DateAndTimeHeader(DateTime dateTime)
{
- return FormatHeader(dateTime.ToString());
+ if (dateTime != _nullTimeStamp)
+ {
+ return FormatHeader(dateTime.ToString());
+ }
+ else
+ {
+ return String.Empty;
+ }
}
#endregion
@@ -119,5 +141,11 @@ namespace zaaReloaded2.Formatter
}
#endregion
+
+ #region Fields
+
+ static readonly DateTime _nullTimeStamp = new DateTime();
+
+ #endregion
}
}
\ No newline at end of file