Skip to content

Commit

Permalink
fix #33
Browse files Browse the repository at this point in the history
  • Loading branch information
iradraconis committed Dec 2, 2023
1 parent 5245622 commit 2972ddc
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 11 deletions.
20 changes: 15 additions & 5 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -609,17 +609,27 @@ function getCurrentDateFormatted() {

const year = currentDate.getFullYear();

// Die getMonth() Methode gibt einen Wert zwischen 0 (für Januar) und 11 (für Dezember) zurück.
// Daher ist 1 hinzufügen, um den korrekten Monat zu erhalten.
let month = currentDate.getMonth() + 1;
month = month < 10 ? '0' + month : month; // Fügt eine führende Null hinzu, wenn der Monat kleiner als 10 ist
month = month < 10 ? '0' + month : month;

let day = currentDate.getDate();
day = day < 10 ? '0' + day : day; // Fügt eine führende Null hinzu, wenn der Tag kleiner als 10 ist
day = day < 10 ? '0' + day : day;

return `${year}-${month}-${day}`;
// Ergänzung für die Uhrzeit
let hours = currentDate.getHours();
hours = hours < 10 ? '0' + hours : hours;

let minutes = currentDate.getMinutes();
minutes = minutes < 10 ? '0' + minutes : minutes;

let seconds = currentDate.getSeconds();
seconds = seconds < 10 ? '0' + seconds : seconds;

// Kombinieren von Datum und Uhrzeit im Format YYYY-MM-DD HH:MM:SS
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}


function setDocumentTag(username, password, serverAddress, documentTag) {

const headers = new Headers();
Expand Down
20 changes: 15 additions & 5 deletions background_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,19 +214,29 @@ function getCurrentDateFormatted() {

const year = currentDate.getFullYear();

// Die getMonth() Methode gibt einen Wert zwischen 0 (für Januar) und 11 (für Dezember) zurück.
// Daher ist 1 hinzufügen, um den korrekten Monat zu erhalten.
let month = currentDate.getMonth() + 1;
month = month < 10 ? '0' + month : month; // Fügt eine führende Null hinzu, wenn der Monat kleiner als 10 ist
month = month < 10 ? '0' + month : month;

let day = currentDate.getDate();
day = day < 10 ? '0' + day : day; // Fügt eine führende Null hinzu, wenn der Tag kleiner als 10 ist
day = day < 10 ? '0' + day : day;

return `${year}-${month}-${day}`;
// Ergänzung für die Uhrzeit
let hours = currentDate.getHours();
hours = hours < 10 ? '0' + hours : hours;

let minutes = currentDate.getMinutes();
minutes = minutes < 10 ? '0' + minutes : minutes;

let seconds = currentDate.getSeconds();
seconds = seconds < 10 ? '0' + seconds : seconds;

// Kombinieren von Datum und Uhrzeit im Format YYYY-MM-DD HH:MM:SS
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}




function setDocumentTagFromSelection(username, password, serverAddress, documentTag) {

const headers = new Headers();
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "j-Lawyer-Thunderbird-Extension",
"version": "0.9.7.9",
"version": "0.9.8",
"description": "Sendet E-Mails an einen j-Lawyer-Server",
"permissions": [
"activeTab",
Expand Down

0 comments on commit 2972ddc

Please sign in to comment.