How to get the current date in pen-script?

Using :format-date and :date

Here is the code to get the current date in pen-script:

{
"current_date": {
":pattern": "D/M/Y",
":format-date": {
":date": "0"
}
}
}

This will return the current date with a format similar to : 28/02/2024.