Skip to content

Commit

Permalink
Merge pull request #137 from acmsigsoft/change_date_format
Browse files Browse the repository at this point in the history
Change date format in downloaded file
  • Loading branch information
drpaulralph authored Aug 29, 2024
2 parents 435715a + c791407 commit 4fbab5a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions form_generator/js/read_standards.js
Original file line number Diff line number Diff line change
Expand Up @@ -1947,9 +1947,6 @@ function saveFile(){
var generated_text = '=================\n' +
'Review Checklist\n' +
'=================\n';

let date_generated = new Date();
generated_text += '\nGenerated at: ' + date_generated.toDateString() + ', ' + date_generated.toLocaleTimeString() + '\n';

var decision = document.getElementById("decision_msg");
var unreasonable = document.getElementById("deviation_unreasonable");
Expand Down Expand Up @@ -2208,6 +2205,14 @@ function saveFile(){

generated_text += "\n";

let date_generated = new Date();
let date_string = date_generated.toLocaleDateString("en-CA", {timeZone: "-12:00"});
let time_string = date_generated.toLocaleTimeString("en-US", {timeZone: "-12:00"});

let date_formatted = new Date(date_string);
generated_text += '\nGenerated: ' + date_generated.toDateString() + ', ';
generated_text += time_string.substr(0,4) + ' ' + time_string.substr(8,3) + ' AoE\n\n';

if (role != "\"author\"") {
generated_text += "=======\n" +
"Legend\n" +
Expand Down

0 comments on commit 4fbab5a

Please sign in to comment.