Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Testing extended dates (very far in the past and future) in

DateTest
  • Loading branch information...
commit b52c6b4f2b723e62922aef034398c5c99878fa8b 1 parent 21f7eb1
Sean Harvey halkyon authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 tests/model/DateTest.php
12 tests/model/DateTest.php
View
@@ -112,4 +112,16 @@ function testDayOfMonth() {
$range = $date->RangeString(DBField::create_field('Date', '2000-10-20'), true);
$this->assertEquals('10th - 20th Oct 2000', $range);
}
+
+ function testExtendedDates() {
+ $date = DBField::create_field('Date', '1800-10-10');
+ $this->assertEquals('10 Oct 1800', $date->Format('d M Y'));
+
+ $date = DBField::create_field('Date', '1500-10-10');
+ $this->assertEquals('10 Oct 1500', $date->Format('d M Y'));
+
+ $date = DBField::create_field('Date', '3000-4-3');
+ $this->assertEquals('03 Apr 3000', $date->Format('d M Y'));
+ }
+
}
Please sign in to comment.
Something went wrong with that request. Please try again.