parse method

Tempus parse (String date)

Constructs a new Tempus instance based on formatted date strings.

Throws a FormatException if the input cannot be parsed. The function parses a subset of ISO 8601 which includes the subset accepted by RFC 3339.

Implementation

static Tempus parse(String date) {
  return new Tempus.fromDate(DateTime.parse(date));
}