GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
Variables
field-date.php File Reference

Go to the source code of this file.

Variables

 $field = $gravityview->field->field
 
if(! isset( $gravityview)||empty( $gravityview->template)) $field_id = $gravityview->field->ID
 The default date field output template. More...
 
 $field_settings = $gravityview->field->as_configuration()
 
 $value = $gravityview->value
 
if( $value==='1970-01-01') if(! empty( $field_settings) &&! empty( $field_settings['date_display']) &&! empty( $value)) else
 Unix Epoch probably isn't what you're looking for. More...
 

Variable Documentation

◆ $field

$field = $gravityview->field->field

Definition at line 15 of file field-date.php.

◆ $field_id

if (! isset($gravityview)||empty($gravityview->template)) $field_id = $gravityview->field->ID

The default date field output template.

$gravityview

Since
2.0

Definition at line 14 of file field-date.php.

◆ $field_settings

$field_settings = $gravityview->field->as_configuration()

Definition at line 17 of file field-date.php.

◆ $value

$value = $gravityview->value

Definition at line 16 of file field-date.php.

◆ else

if ($value==='1970-01-01') if (! empty($field_settings) &&! empty($field_settings[ 'date_display']) &&! empty($value)) else
Initial value:
{
$value
Definition: field-date.php:16
$field
Definition: field-date.php:15
if(! isset( $gravityview)||empty( $gravityview->template)) $field_id
The default date field output template.
Definition: field-date.php:14
static date_display( $value='', $date_format='mdy', $field_id=0)
Get the default date format for a field based on the field ID and the time format setting...

Unix Epoch probably isn't what you're looking for.

Since
1.7
Runs Filter:
gravityview/fields/date/hide_epoch Whether to hide 1970-01-01 dates; that is normally an erroneous date. Return false to show value. Use __return_false callback.
Parameters
bool$hide_epochTrue: hide values that are 1970-01-01. False: show the value.
Since
2.0
Parameters
\GV\Template_Context$gravityviewThe $gravityview context object.

Definition at line 46 of file field-date.php.