getAsDuration method

Duration getAsDuration(
  1. int index
)

Converts array element into a Duration or returns the current date if conversion is not possible.

  • index an index of element to get. Returns Duration value ot the element or the current date if conversion is not supported.

See getAsDurationWithDefault

Implementation

Duration getAsDuration(int index) {
  return getAsDurationWithDefault(index, Duration());
}