Iam using module Smart Date on Drupal 9.
And required programmatically add value to node in field with recurring rule (like Repeats every 1 year on xxxx-xx-xx). Technically, for this action also creating record in Rule table... But I understand, how this do... It seems like the smartdate module itself should make an entry in this additional table.
I used like this operation:
// Create new node:
$node = \Drupal::entityTypeManager()->getStorage('node')->create([
'type' => 'event',
'title' => 'My new note title',
]);
// Assign value to field_date:
$node->set('field_date', '2022-03-01');
// ...needed add here also rule of yearly recurring...
field_data - its name of smartdate field, but how add field value with complete data (repeats every, until and etc.)? Like in field widget on node edit with admin panel, there are more options available for this field.
Any ideas?