Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
MSzturc committed Oct 15, 2022
1 parent 0d35682 commit 3200862
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,12 @@ export default class AdvancedSlidesPlugin extends Plugin {
});




const prevDate = this.settings.motm;
const parts = prevDate.split(/[- :]/);
const currentdate = new Date()
const cur_month = currentdate.toISOString().split(/[- :]/)[1];

if (parts || (parts.length < 2) || parts[1] !== cur_month) {
if (!parts || (parts.length < 2) || parts[1] !== cur_month) {

this.settings.motm = currentdate.toISOString();
await this.saveData(this.settings);
Expand Down

0 comments on commit 3200862

Please sign in to comment.