<script language="JavaScript">
function add()
{
var y = String(document.formRegister.DateBegin.value);
document.formRegister.DateEnd.value = y;
}
</script>
let date = '2024-02-24'
let objDate = moment(date)
let firstDate = objDate.format('DD/MM/YYYY')
let lastDate = objDate.add(1, 'y').format('DD/MM/YYYY')
console.log(firstDate)
console.log(lastDate)