withTemplateValue method

ZonedDateTimePattern withTemplateValue(
  1. ZonedDateTime newTemplateValue
)

Creates a pattern like this one, but with the specified template value.

  • newTemplateValue: The template value for the new pattern, used to fill in unspecified fields.

Returns: A new pattern with the given template value.

Implementation

ZonedDateTimePattern withTemplateValue(ZonedDateTime newTemplateValue) =>
    newTemplateValue == templateValue
        ? this
        : _create(patternText, _formatInfo, resolver, zoneProvider,
            newTemplateValue);