Example #1
0
void ecl_util_init_month_range( time_t_vector_type * date_list , time_t start_date , time_t end_date) {
  time_t_vector_reset( date_list );
  if (!util_is_first_day_in_month( start_date ))
    time_t_vector_append( date_list , util_make_pure_date(start_date));
  
  ecl_util_append_month_range( date_list , start_date , end_date , true );
}
Example #2
0
void ecl_sum_data_init_time_vector( const ecl_sum_data_type * data , time_t_vector_type * time_vector , bool report_only) {
  time_t_vector_reset( time_vector );
  time_t_vector_append( time_vector , ecl_smspec_get_start_time( data->smspec ));
  if (report_only) {
    int report_step;
    for (report_step = data->first_report_step; report_step <= data->last_report_step; report_step++) {
      int last_index = int_vector_iget(data->report_last_index , report_step);
      const ecl_sum_tstep_type * ministep = ecl_sum_data_iget_ministep( data , last_index );
      time_t_vector_append( time_vector , ecl_sum_tstep_get_sim_time( ministep ) );
    }
  } else {
    int i;
    for (i = 0; i < vector_get_size(data->data); i++) {
      const ecl_sum_tstep_type * ministep = ecl_sum_data_iget_ministep( data , i  );
      time_t_vector_append( time_vector , ecl_sum_tstep_get_sim_time( ministep ));
    }
  }
}