Problem
The handwritten, .NET-friendly DatePicker.DateTime, MinDateTime, and MaxDateTime properties in the shipped Mono.Android.dll have no XML documentation. Developers cannot tell from IntelliSense that DateTime converts between .NET’s 1-based month and Android’s 0-based month, or that the minimum and maximum properties wrap Android’s millisecond-based date values.
Location
- File(s):
src/Mono.Android/Android.Widget/DatePicker.cs
- Line(s): 9-19
Current Code
public DateTime DateTime {
get { return new DateTime (Year, Month + 1, DayOfMonth); }
set { UpdateDate (value.Year, value.Month - 1, value.Day); }
}
#if ANDROID_11
public DateTime MinDateTime {
get { return new DateTime (1970, 1, 1).AddMilliseconds (MinDate); }
}
public DateTime MaxDateTime {
get { return new DateTime (1970, 1, 1).AddMilliseconds (MaxDate); }
}
#endif
Suggested Fix
Add XML documentation directly above all three properties without changing their implementations. Use wording equivalent to:
/// <summary>Gets or sets the date selected in this picker.</summary>
/// <remarks>Only the year, month, and day components are used when setting the value. This property converts between .NET’s 1-based month and Android’s 0-based month.</remarks>
/// <seealso href="(developer.android.com/redacted) `DatePicker` documentation</seealso>
public DateTime DateTime { ... }
#if ANDROID_11
/// <summary>Gets the minimum selectable date supported by this picker.</summary>
/// <value>The minimum date converted from Android’s millisecond value relative to January 1, 1970.</value>
/// <seealso href="(developer.android.com/redacted) `DatePicker.getMinDate` documentation</seealso>
public DateTime MinDateTime { ... }
/// <summary>Gets the maximum selectable date supported by this picker.</summary>
/// <value>The maximum date converted from Android’s millisecond value relative to January 1, 1970.</value>
/// <seealso href="(developer.android.com/redacted) `DatePicker.getMaxDate` documentation</seealso>
public DateTime MaxDateTime { ... }
#endif
The owning project is src/Mono.Android/Mono.Android.csproj, which resolves to net11.0 and LangVersion=latest. The suggested fix introduces no runtime APIs or language syntax beyond XML comments.
Guidelines
- Follow dotnet/android formatting conventions: tabs for indentation and a space before
(.
- Keep this documentation-only; do not alter property behavior or conditional compilation.
- Use the linked official Android
DatePicker API documentation.
Acceptance Criteria
Fix-finder metadata
- Script:
04-missing-xml-docs
- Score:
30/30 (actionability: 10, safety: 10, scope: 10)
Generated by Nightly Fix Finder · gpt56 · 47.5 AIC · ⌖ 24.7 AIC · ⊞ 28.5K · ◷
Problem
The handwritten, .NET-friendly
DatePicker.DateTime,MinDateTime, andMaxDateTimeproperties in the shippedMono.Android.dllhave no XML documentation. Developers cannot tell from IntelliSense thatDateTimeconverts between .NET’s 1-based month and Android’s 0-based month, or that the minimum and maximum properties wrap Android’s millisecond-based date values.Location
src/Mono.Android/Android.Widget/DatePicker.csCurrent Code
Suggested Fix
Add XML documentation directly above all three properties without changing their implementations. Use wording equivalent to:
The owning project is
src/Mono.Android/Mono.Android.csproj, which resolves tonet11.0andLangVersion=latest. The suggested fix introduces no runtime APIs or language syntax beyond XML comments.Guidelines
(.DatePickerAPI documentation.Acceptance Criteria
DateTime,MinDateTime, andMaxDateTimeeach have an XML<summary>.#if ANDROID_11guards remain unchanged.Fix-finder metadata
04-missing-xml-docs30/30(actionability:10, safety:10, scope:10)