set current date

This commit is contained in:
Ralf D. Müller
2022-10-15 15:45:52 +00:00
parent 1c6772f383
commit f371c176b6

View File

@@ -19,7 +19,8 @@ function run() {
<button onclick="document.getElementById('editor').hidden = false; this.hidden = true;" >Editor</button>
<div id='editor' hidden='true'>
<textarea id="cnsl">
fetch('/fileserver/log/message/log_2022-10-15.txt')
var date = getFullYear() + "-" + (getMonth()+1) + "-" + getDate();
fetch('/fileserver/log/message/log_'+date+'.txt')
.then(response => {
// handle the response
response.text()