get today's date null -> null
552583
function datesOfToday () {
  const ret = {}

  ret.year = String(new Date().getFullYear())
  ret.month = prefix(String(new Date().getMonth()))
  ret.day = prefix(String(new Date().getDate()))
  ret.date = [ret.year, ret.month, ret.day].join('-')

  return ret
}
145890
function enableDay(date, d) {
  var val = replace(date, {d: d});
  if (date.getFullYear() === val.getFullYear() &&
      date.getMonth() === val.getMonth()) {
    return val;
  } else {
    return null;
  }
}
1102903
function parse (val) {
  if (!exists(val)) { return null }
  var date = new Date(val)
  return isNaN(date.valueOf()) ? null : date
}
941349
public Date getDate( int index ) throws OdaException
	{
		java.util.Date value = (java.util.Date) getFieldValue(index);
		return value==null?new Date(0):new Date(value.getTime());
	}
511962
private String formatDateTimeNull(Date value)
   {
      return (value == null ? m_formats.getNullText() : m_formats.getDateTimeFormat().format(value));
   }
528198
function(input, null_text) {
      if (input == null || input === undefined) return null_text || '';
      if (input instanceof(Date)) return input.toDateString();
      if (input.toString) return input.toString().replace(/\n/g, '<br />').replace(/''/g, "'");
      return '';
    }
988879
@Nullable
    public static DayOfTheWeek valueOf(@Nullable final String str) {
        if (str == null) {
            return null;
        }
        for (final DayOfTheWeek dow : ALL) {
            if (dow.value.equalsIgnoreCase(str)) {
                return dow;
            }
        }
        throw new IllegalArgumentException("Unknown day of week: '" + str + "'");
    }
374341
def get_date():
    '''
    
    '''
    ret = salt.utils.mac_utils.execute_return_result('systemsetup -getdate')
    return salt.utils.mac_utils.parse_return(ret)
1165506
private String getStringForDay(int day) {
        if(fDates == null) {
            loadDates();
        }
        for(URelativeString dayItem : fDates) {
            if(dayItem.offset == day) {
                return dayItem.string;
            }
        }
        return null;
    }
464393
@Override
    public Date getDate(@NonNull String key) {
        if (key == null) { throw new IllegalArgumentException("key cannot be null."); }

        final int index = indexForColumnName(key);
        return index >= 0 ? getDate(index) : null;
    }
299720
private function getTimeDrift(string $date) :? int
    {
        $now = new \DateTime();
        $now->format(\DateTime::RFC1123);

        try {
            $realDate = new DateTime($date);
        } catch (\Exception $e) {
            return null;
        }

        return (int)\abs($now->getTimestamp() - $realDate->getTimestamp());
    }
324335
@Nullable
    public static Date getDate(@NonNull SharedPreferences prefs, @NonNull String key) {
        long time = prefs.getLong(key, Long.MIN_VALUE);
        return time == Long.MIN_VALUE ? null : new Date(time);
    }
1257920
public Date getLastModificationDate() {
		if (this.year == 0 || this.month == 0 || this.day == 0){
			return null;
		}
		try {
			Calendar calendar = Calendar.getInstance();
			calendar.set(this.year, this.month, this.day, 0, 0, 0);
			calendar.set(Calendar.MILLISECOND, 0);
			return calendar.getTime();
		}
		catch (Exception e) {
			return null;
		}
	}
946131
public static function shortDate($date)
    {
        if (self::isDate($date)) {
            $str = self::dateTimeToTimeStamp($date);
            $string = date("d.m.Y", $str);
            return $string;
        } else {
            return null;
        }
    }
1161693
function ( sData )
		{
			var iParse = Date.parse(sData);
			if ( (iParse !== null && !isNaN(iParse)) || (typeof sData === 'string' && sData.length === 0) )
			{
				return 'date';
			}
			return null;
		}
856055
public static String formatTimestamp(@Nullable Date date) {
        return (date != null) ? date.toInstant().toString() : null;
    }
106840
@CheckForNull
  public static Date parseDateOrDateTime(@Nullable String stringDate) {
    if (stringDate == null) {
      return null;
    }

    OffsetDateTime odt = parseOffsetDateTimeQuietly(stringDate);
    if (odt != null) {
      return Date.from(odt.toInstant());
    }

    LocalDate ld = parseLocalDateQuietly(stringDate);
    checkArgument(ld != null, "Date '%s' cannot be parsed as either a date or date+time", stringDate);

    return Date.from(ld.atStartOfDay(ZoneId.systemDefault()).toInstant());
  }