CurtHagenlocher commented on code in PR #36125:
URL: https://github.com/apache/arrow/pull/36125#discussion_r1265800146
##########
csharp/src/Apache.Arrow/Arrays/Date32Array.cs:
##########
@@ -108,5 +118,21 @@ public Date32Array(ArrayData data)
? new DateTimeOffset(_epochDate.AddDays(value.Value),
TimeSpan.Zero)
: default(DateTimeOffset?);
}
+
+#if NET6_0_OR_GREATER
+ /// <summary>
+ /// Get the date at the specified index
+ /// </summary>
+ /// <param name="index">Index at which to get the date.</param>
+ /// <returns>Returns a <see cref="DateOnly" />, or <c>null</c> if
there is no object at that index.
+ /// </returns>
+ public DateOnly? GetDateOnly(int index)
+ {
+ int? value = GetValue(index);
+ return value.HasValue
+ ? DateOnly.FromDayNumber(_epochDayNumber + value.Value)
Review Comment:
ArgumentOutOfRangeException. Like System.DateTime, the maximum date is
9999-12-31,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]