Enhancement
- Allows relative dates such as "1st" to be entered with capital ("1ST").
This commit is contained in:
committed by
Paul Beckingham
parent
ee0a16f663
commit
b5cd5ea188
@@ -35,7 +35,7 @@ Context context;
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest t (174);
|
||||
UnitTest t (177);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -342,6 +342,13 @@ int main (int argc, char** argv)
|
||||
Date r16 ("soy");
|
||||
t.notok (r16.sameYear (now), "soy not in same year as now");
|
||||
|
||||
Date first ("1st");
|
||||
t.notok (first.sameMonth (now), "1st not in same month as now");
|
||||
t.is (first.day (), 1, "1st day is 1");
|
||||
|
||||
Date FIRST ("1ST");
|
||||
t.ok (FIRST == first, "1st == 1ST");
|
||||
|
||||
Date later ("later");
|
||||
t.is (later.month (), 1, "later -> m = 1");
|
||||
t.is (later.day (), 18, "later -> d = 18");
|
||||
|
||||
Reference in New Issue
Block a user