diff --git a/Controllers/HanyadikHetVanController.cs b/Controllers/HanyadikHetVanController.cs index 338c6bc..3882fad 100644 --- a/Controllers/HanyadikHetVanController.cs +++ b/Controllers/HanyadikHetVanController.cs @@ -21,7 +21,6 @@ namespace hanyadikhetvan.Controllers [HttpGet] public HanyadikHetVan Get() { - _logger.LogWarning(DateTime.Parse(Environment.GetEnvironmentVariable("HANYADIKHET_STARTDATE")).ToString()); return new HanyadikHetVan(); } } diff --git a/HanyadikHetVan.cs b/HanyadikHetVan.cs index c2a9a02..50c566f 100644 --- a/HanyadikHetVan.cs +++ b/HanyadikHetVan.cs @@ -7,6 +7,6 @@ namespace hanyadikhetvan { public class HanyadikHetVan { - public int HanyadikHet => DateTime.Now.Subtract(DateTime.Parse(Environment.GetEnvironmentVariable("HANYADIKHET_STARTDATE"))).Days / 7; + public int HanyadikHet => (DateTime.Now - (DateTime.Parse(Environment.GetEnvironmentVariable("HANYADIKHET_STARTDATE")))).Days / 7; } } diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json index e893084..0ab6b32 100644 --- a/Properties/launchSettings.json +++ b/Properties/launchSettings.json @@ -22,6 +22,7 @@ "launchBrowser": true, "launchUrl": "swagger", "environmentVariables": { + "HANYADIKHET_STARTDATE": "2021-02-08", "ASPNETCORE_ENVIRONMENT": "Development" }, "dotnetRunMessages": "true",