/// <summary> /// Specifies data formats used when mapping the value of a cell to a DateTime. This is useful for /// mapping columns where data formats differ. Existing date formats are overriden. /// </summary> /// <param name="propertyMap">The property map to use.</param> /// <param name="formats">A list of date formats to use when mapping the value of a cell to a DateTime.</param> /// <returns>The property map on which this method was invoked.</returns> public static SingleExcelPropertyMap <DateTime?> WithDateFormats(this SingleExcelPropertyMap <DateTime?> propertyMap, IEnumerable <string> formats) { return(propertyMap.WithDateFormats(formats?.ToArray())); }
/// <summary> /// Specifies data formats used when mapping the value of a cell to a DateTime. This is useful for /// mapping columns where data formats differ. Existing date formats are overriden. /// </summary> /// <param name="propertyMap">The property map to use.</param> /// <param name="formats">A list of date formats to use when mapping the value of a cell to a DateTime.</param> /// <returns>The property map on which this method was invoked.</returns> public static SingleExcelPropertyMap <DateTime?> WithDateFormats(this SingleExcelPropertyMap <DateTime?> propertyMap, params string[] formats) { propertyMap.AddFormats(formats); return(propertyMap); }