original_string: function exportValue(&$submitValues, $assoc = false) {
          $valuearray = array();
          foreach ($this->_elements as $element){
              $thisexport = $element->exportValue($submitValues[$this->getName()], true);
              if ($thisexport!=null){
                  $valuearray += $thisexport;
              }
          }
          if (count($valuearray) && isset($valuearray['year'])) {
              if($this->_options['optional']) {
                  // If checkbox is on, the value is zero, so go no further
                  if(empty($valuearray['enabled'])) {
                      return $this->_prepareValue(0, $assoc);
                  }
              }
              // Get the calendar type used - see MDL-18375.
              $calendartype = \core_calendar\type_factory::get_calendar_instance();
              $gregoriandate = $calendartype->convert_to_gregorian($valuearray['year'], $valuearray['month'], $valuearray['day']);
              $value = make_timestamp($gregoriandate['year'],
                                                        $gregoriandate['month'],
                                                        $gregoriandate['day'],
                                                        0, 0, 0,
                                                        $this->_options['timezone'],
                                                        true);
  
              return $this->_prepareValue($value, $assoc);
          } else {
              return null;
          }
      }
code: function exportValue(&$submitValues, $assoc = false) {
          $valuearray = array();
          foreach ($this->_elements as $element){
              $thisexport = $element->exportValue($submitValues[$this->getName()], true);
              if ($thisexport!=null){
                  $valuearray += $thisexport;
              }
          }
          if (count($valuearray) && isset($valuearray['year'])) {
              if($this->_options['optional']) {
                  // If checkbox is on, the value is zero, so go no further
                  if(empty($valuearray['enabled'])) {
                      return $this->_prepareValue(0, $assoc);
                  }
              }
              // Get the calendar type used - see MDL-18375.
              $calendartype = \core_calendar\type_factory::get_calendar_instance();
              $gregoriandate = $calendartype->convert_to_gregorian($valuearray['year'], $valuearray['month'], $valuearray['day']);
              $value = make_timestamp($gregoriandate['year'],
                                                        $gregoriandate['month'],
                                                        $gregoriandate['day'],
                                                        0, 0, 0,
                                                        $this->_options['timezone'],
                                                        true);
  
              return $this->_prepareValue($value, $assoc);
          } else {
              return null;
          }
      }
code_tokens: function exportValue ( & $ submitValues , $ assoc = false ) { $ valuearray = array ( ) ; foreach ( $ this -> _elements as $ element ) { $ thisexport = $ element -> exportValue ( $ submitValues [ $ this -> getName ( ) ] , true ) ; if ( $ thisexport != null ) { $ valuearray += $ thisexport ; } } if ( count ( $ valuearray ) && isset ( $ valuearray [ 'year' ] ) ) { if ( $ this -> _options [ 'optional' ] ) { // If checkbox is on, the value is zero, so go no further if ( empty ( $ valuearray [ 'enabled' ] ) ) { return $ this -> _prepareValue ( 0 , $ assoc ) ; } } // Get the calendar type used - see MDL-18375. $ calendartype = \ core_calendar \ type_factory :: get_calendar_instance ( ) ; $ gregoriandate = $ calendartype -> convert_to_gregorian ( $ valuearray [ 'year' ] , $ valuearray [ 'month' ] , $ valuearray [ 'day' ] ) ; $ value = make_timestamp ( $ gregoriandate [ 'year' ] , $ gregoriandate [ 'month' ] , $ gregoriandate [ 'day' ] , 0 , 0 , 0 , $ this -> _options [ 'timezone' ] , true ) ; return $ this -> _prepareValue ( $ value , $ assoc ) ; } else { return null ; } }
docstring: Output a timestamp. Give it the name of the group.
  
  @param array $submitValues values submitted.
  @param bool $assoc specifies if returned array is associative
  @return array
docstring_tokens: Output a timestamp . Give it the name of the group .