Minor fix to expiry formatting; new constants

This commit is contained in:
Rick Falkvinge
2017-01-19 00:44:43 +01:00
parent 8f8004ea3f
commit 1b0a98aabc
2 changed files with 3 additions and 4 deletions
+3 -3
View File
@@ -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 (
@@ -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();
}