From 1b0a98aabc740d1500f56163229ba7c7a2834fbc Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Thu, 19 Jan 2017 00:44:43 +0100 Subject: [PATCH] Minor fix to expiry formatting; new constants --- Site/Automation/Json-PositionsTree.aspx.cs | 6 +++--- Site/Controls/v5/Swarm/TreePositions.ascx.cs | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Site/Automation/Json-PositionsTree.aspx.cs b/Site/Automation/Json-PositionsTree.aspx.cs index f6c9cd45..f51d2192 100644 --- a/Site/Automation/Json-PositionsTree.aspx.cs +++ b/Site/Automation/Json-PositionsTree.aspx.cs @@ -224,10 +224,10 @@ namespace Swarmops.Frontend.Automation assignments[0].PersonId == CurrentUser.Identity ? "self='true'" : string.Empty); } - int expireYear = assignments[assignmentCount].ExpiresDateTimeUtc.Year; - if (expireYear > 2000 && expireYear < 3000) // as in, "is defined" + DateTime expiresUtc = assignments[assignmentCount].ExpiresDateTimeUtc; + if (expiresUtc.IsDefined()) { - expires = assignments[assignmentCount].ExpiresDateTimeUtc.ToString ("yyyy-MMM-dd"); + expires = expiresUtc.ToString ("yyyy-MMM-dd"); } element = String.Format ( diff --git a/Site/Controls/v5/Swarm/TreePositions.ascx.cs b/Site/Controls/v5/Swarm/TreePositions.ascx.cs index a96ca7f8..da3b99bf 100644 --- a/Site/Controls/v5/Swarm/TreePositions.ascx.cs +++ b/Site/Controls/v5/Swarm/TreePositions.ascx.cs @@ -19,7 +19,6 @@ namespace Swarmops.Frontend.Controls.Swarm protected void Page_Load (object sender, EventArgs e) // PreRender to make sure teh DropDuration control exists { - this.DropPerson.Placeholder = Resources.Global.Swarm_TypeName; Localize(); }