2 using System.Collections.Generic;
6 namespace Newtonsoft.Json.Converters
9 /// Provides a base class for converting a <see cref="DateTime"/> to and from JSON.
11 public abstract class DateTimeConverterBase : JsonConverter
14 /// Determines whether this instance can convert the specified object type.
16 /// <param name="objectType">Type of the object.</param>
18 /// <c>true</c> if this instance can convert the specified object type; otherwise, <c>false</c>.
20 public override bool CanConvert(Type objectType)
22 if (objectType == typeof(DateTime) || objectType == typeof(DateTime?))
24 #if !PocketPC && !NET20
25 if (objectType == typeof(DateTimeOffset) || objectType == typeof(DateTimeOffset?))