Skip to content

Commit

Permalink
fix for issue 378
Browse files Browse the repository at this point in the history
  • Loading branch information
danielruss committed Feb 14, 2022
1 parent b6ba434 commit 7b3064b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions replace2.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ transform.render = async (obj, divId, previousResults = {}) => {

contents = unrollLoops(contents);

// #issue 378, note: getMonth 0=Jan, need to add 1
contents = contents.replace(/#currentMonthStr/g, ["Jan", "Feb", "Mar", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'][new Date().getMonth()]);
contents = contents.replace(/#currentMonth/g, new Date().getMonth() + 1);
contents = contents.replace(/#currentYear/g, new Date().getFullYear());
// hey, lets de-lint the contents..
// convert (^|\n{2,}Q1. to [Q1]
Expand Down

0 comments on commit 7b3064b

Please sign in to comment.