public function currentDate($type = 'date')
{
if (!in_array($type, ['date', 'timestamp'])) {
throw new InvalidArgumentException('Type for currentDate operator must be date or timestamp.');
}
$this->requiresCurrentField();
$this->newObj['$currentDate'][$this->currentField]['$type'] = $type;
return $this;
}