[tasque] Simplify today comparison in TaskGroupModel



commit 5a0f7620aeaa2a7dbd2261a0c3936cb4da5c8d0a
Author: Antonius Riha <antoniusriha gmail com>
Date:   Thu Jan 10 15:52:29 2013 +0100

    Simplify today comparison in TaskGroupModel

 src/libtasque/TaskGroupModel.cs |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/src/libtasque/TaskGroupModel.cs b/src/libtasque/TaskGroupModel.cs
index 196d565..23eead6 100644
--- a/src/libtasque/TaskGroupModel.cs
+++ b/src/libtasque/TaskGroupModel.cs
@@ -244,23 +244,13 @@ namespace Tasque
 				if (task.CompletionDate == DateTime.MinValue)
 					return false; // Just in case
 				
-				if (!IsToday (task.CompletionDate))
+				if (task.CompletionDate.Date != DateTime.Today)
 					return false;
 			}
 			
 			return true;
 		}
 		
-		private bool IsToday (DateTime testDate)
-		{
-			DateTime today = DateTime.Now;
-			if (today.Year != testDate.Year
-					|| today.DayOfYear != testDate.DayOfYear)
-				return false;
-			
-			return true;
-		}
-		
 		#region Explicit content
 		IEnumerator IEnumerable.GetEnumerator ()
 		{



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]