includes/class-parse-this-mf2.php
public static function get_datetime_property( $name, array $mf, $ensurevalid = false, $fallback = null ) {
		$compliment = 'published' === $name ? 'updated' : 'published';
		if ( self::has_prop( $mf, $name ) ) {
			$return = self::get_prop( $mf, $name ); } elseif ( self::has_prop( $mf, $compliment ) ) {
			$return = self::get_prop( $mf, $compliment );
			} else {
				return $fallback; }
			if ( ! $ensurevalid ) {
				return $return; } else {
				try {
					$date = new DateTime( $return );
					return $date->format( DATE_W3C );
				} catch ( Exception $e ) {
					return $fallback;
				}
				}
	}
public static function get_datetime_property( $name, array $mf, $ensurevalid = false, $fallback = null ) {
		$compliment = 'published' === $name ? 'updated' : 'published';
		if ( self::has_prop( $mf, $name ) ) {
			$return = self::get_prop( $mf, $name ); } elseif ( self::has_prop( $mf, $compliment ) ) {
			$return = self::get_prop( $mf, $compliment );
			} else {
				return $fallback; }
			if ( ! $ensurevalid ) {
				return $return; } else {
				try {
					$date = new DateTime( $return );
					return $date->format( DATE_W3C );
				} catch ( Exception $e ) {
					return $fallback;
				}
				}
	}
public static function get_datetime_property ( $ name , array $ mf , $ ensurevalid = false , $ fallback = null ) { $ compliment = 'published' === $ name ? 'updated' : 'published' ; if ( self :: has_prop ( $ mf , $ name ) ) { $ return = self :: get_prop ( $ mf , $ name ) ; } elseif ( self :: has_prop ( $ mf , $ compliment ) ) { $ return = self :: get_prop ( $ mf , $ compliment ) ; } else { return $ fallback ; } if ( ! $ ensurevalid ) { return $ return ; } else { try { $ date = new DateTime ( $ return ) ; return $ date -> format ( DATE_W3C ) ; } catch ( Exception $ e ) { return $ fallback ; } } }
Gets the DateTime properties including published or updated, depending on params.

@param $name string updated or published
@param array                            $mf
@param bool                             $ensurevalid
@param null|string                      $fallback
@return mixed|null
Gets the DateTime properties including published or updated depending on params .