title: Having a date with a day number > 12 gives a Newtonsoft.Json.JsonReaderException
body: <p>I have this class which deserializes the json of the object I receive so I can then put it into a class:</p>
  <pre><code>public CourseOverview CreateCourseOverview(object obj)
          {
              var instance = JsonConvert.DeserializeObject&lt;CourseOverview&gt;(obj.ToString());
              var courseOverview = new CourseOverview { CourseCode = instance.CourseCode, StartDate = instance.StartDate, Duration = instance.Duration, Title = instance.Title };
              Console.WriteLine(courseOverview);
              return courseOverview;
          }
  </code></pre>
  <p>The class it should be put into looks like this:</p>
  <pre><code>public class CourseOverview
      {
          [JsonConverter(typeof(CustomDateTimeConverter))]
          public DateTime StartDate { get; set; }
          public string Duration { get; set; }
          public string Title { get; set; }
          public string CourseCode { get; set; }
      }
  </code></pre>
  <p>The JsonConverter : CustomDateTimeConverter part I found on a different stackoverflow post. <strong>It however seems like it fails because it's expecting the first two characters to be the month (which cannot be &gt; 12)</strong>:</p>
  <pre><code>public class CustomDateTimeConverter : DateTimeConverterBase
      {
          private const string Format = &quot;dd/MM/yyyy&quot;;
  
          public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
          {
              writer.WriteValue(((DateTime)value).ToString(Format));
          }
  
          public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
          {
              if (reader.Value == null)
              {
                  return null;
              }
  
              var s = reader.Value.ToString();
              DateTime result;
              if (DateTime.TryParseExact(s, Format, CultureInfo.InvariantCulture, DateTimeStyles.None, out result))
              {
                  return result;
              }
              return null;
          }
      }
  </code></pre>
  <p>All works wonderful until I get a date like 15/10/2020, then it crashes with the message: <br />
  <em>Newtonsoft.Json.JsonReaderException: Could not convert string to DateTime: 15/10/2020</em></p>
  <p>Full error:</p>
  <pre><code>Reached? 1
  fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
        An unhandled exception has occurred while executing the request.
        Newtonsoft.Json.JsonReaderException: Could not convert string to DateTime: 18/10/2018. Path 'startDate', line 1, position 77.
           at Newtonsoft.Json.JsonReader.ReadDateTimeString(String s)
           at Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType)
           at Newtonsoft.Json.JsonTextReader.ReadAsDateTime()
           at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
           at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
           at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
           at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
           at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
           at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
           at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
           at CourseEnv.Core.Factories.CourseFactory.CreateCourseOverview(Object obj) in C:\Users\pc\source\repos\CourseOverviewSln\CourseApp.Core\Factories\CourseFactory.cs:line 30
           at CourseApp.APIs.CourseAPI.AddCoursesFromFileAsync(Object[] objects) in C:\Users\pc\source\repos\CourseOverviewSln\CoursesApp\APIs\CourseAPI.cs:line 40
           at lambda_method5(Closure , Object )
           at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeActionMethodAsync&gt;g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeNextActionFilterAsync&gt;g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State&amp; next, Scope&amp; scope, Object&amp; state, Boolean&amp; isCompleted)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
        --- End of stack trace from previous location ---
           at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeFilterPipelineAsync&gt;g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeAsync&gt;g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeAsync&gt;g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
           at Microsoft.AspNetCore.Routing.EndpointMiddleware.&lt;Invoke&gt;g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
           at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
           at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
  </code></pre>