add isEmpty() and toString() to DateAndTime

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1144645 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-07-09 11:26:00 +00:00
parent 2a96d74ace
commit a5e5b26013

View File

@ -83,4 +83,18 @@ public final class DateAndTime
{ {
return super.clone(); return super.clone();
} }
public boolean isEmpty()
{
return _info == 0 && _info2 == 0;
}
@Override
public String toString()
{
if ( isEmpty() )
return "[DTTM] EMPTY";
return "[DTTM] " + getDate();
}
} }