Skip to content
This repository
Browse code

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

DateTest
  • Loading branch information...
commit b52c6b4f2b723e62922aef034398c5c99878fa8b 1 parent 21f7eb1
Sean Harvey authored April 12, 2012

Showing 1 changed file with 12 additions and 0 deletions. Show diff stats Hide diff stats

  1. 12  tests/model/DateTest.php
12  tests/model/DateTest.php
@@ -112,4 +112,16 @@ function testDayOfMonth() {
112 112
 		$range = $date->RangeString(DBField::create_field('Date', '2000-10-20'), true);
113 113
 		$this->assertEquals('10th - 20th Oct 2000', $range);
114 114
 	}
  115
+
  116
+	function testExtendedDates() {
  117
+		$date = DBField::create_field('Date', '1800-10-10');
  118
+		$this->assertEquals('10 Oct 1800', $date->Format('d M Y'));
  119
+
  120
+		$date = DBField::create_field('Date', '1500-10-10');
  121
+		$this->assertEquals('10 Oct 1500', $date->Format('d M Y'));
  122
+
  123
+		$date = DBField::create_field('Date', '3000-4-3');
  124
+		$this->assertEquals('03 Apr 3000', $date->Format('d M Y'));
  125
+	}
  126
+
115 127
 }

0 notes on commit b52c6b4

Please sign in to comment.
Something went wrong with that request. Please try again.