Autosort in LibreOffice

I have a script in google sheets that allows me to have my sheet sorted as soon as one date column changes. Here is the script.

function onEdit(event){
var sheet = event.source.getActiveSheet();
var editedCell = sheet.getActiveCell();

var columnToSortBy = 9;
var tableRange = “a3:ac103”;

if(editedCell.getColumn() == columnToSortBy){
var range = sheet.getRange(tableRange);
range.sort( { column : columnToSortBy } );
}
}

I see previous forums here about this such as this one closed in '15 and I’ve seen others that suggest Pivot Tables. Neither of these are worthwhile for me. I just want my sheet to autosort simply upon a change in date. I find this function so beneficial that I cannot change from google sheets until someone else offers this.
Is there a way to do this here?

Welcome! I offer a possible solution not to make you give up Google sheets, but to make you sure that it is not much more complicated here:

Sub onContentChanged(oEvent As Variant)
Const columnToSortBy = 8
Const sTableRange = "A2:AC103"
Dim oRange As Variant
Dim aSortFields(0) As New com.sun.star.util.SortField
Dim aSortDesc(1) As New com.sun.star.beans.PropertyValue
	If oEvent.getRangeAddress().StartColumn = columnToSortBy Then
		oRange = oEvent.getSpreadsheet().getCellRangeByName(sTableRange)
		aSortFields(0).Field = columnToSortBy
		aSortFields(0).SortAscending = TRUE
		aSortDesc(0).Name = "SortFields"
		aSortDesc(0).Value = aSortFields()
		aSortDesc(1).Name = "ContainsHeader"
		aSortDesc(1).Value = True
		oRange.Sort(aSortDesc())
	EndIf 
End Sub

Unlike Google sheets or Excel, the function name will not become an automatic trigger, you need to assign a procedure as a sheet event handler (right click on the sheet tab)