DateOnly.withString constructor

DateOnly.withString(
  1. String dateString
)

Creates a new date-only object with the given date string.

The provided date string must conform to the ISO 8601 date and time format.

Parameters:

  • dateString — The ISO 8601 date string.

Implementation

factory DateOnly.withString(String dateString) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreDateString = _CString(dateString);
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_DateOnly_createWithString(
        coreDateString.bytes, errorHandler);
  });
  return DateOnly._withHandle(handle);
}