DateOnly.withYearMonthDay constructor

DateOnly.withYearMonthDay(
  1. {required int year,
  2. required int month,
  3. required int day}
)

Creates a new date-only object from the provided year, month, and day.

Year must be at least 1 AD, month must be a value between 1-12 (inclusive), day must be a value between 1-31 (inclusive).

Parameters:

  • year — The year.
  • month — The month.
  • day — The day.

Implementation

factory DateOnly.withYearMonthDay(
    {required int year, required int month, required int day}) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_DateOnly_createWithYearMonthDay(
        year, month, day, errorHandler);
  });
  return DateOnly._withHandle(handle);
}