convertFromExtendedTimestamp static method
Accepts either a timestamp or an extended timestamp as input and returns the timestamp value only.
Implementation
static int convertFromExtendedTimestamp(String extendedTimestamp) {
if (!isExtendedTimestamp(extendedTimestamp)) {
throw StorageException('invalid timestamp "$extendedTimestamp"');
}
RegExp regExp = RegExp(_regexExtendedTimestampString);
Iterable<RegExpMatch> matches = regExp.allMatches(extendedTimestamp);
RegExpMatch m = matches.elementAt(0);
return int.parse(m.group(1)!);
}