Compare commits
No commits in common. "f744215c13257578dcfd5b6cb8a6f4d498d45dc8" and "4896fee8d2595c347c52d4c59dcd31dd8b8f15f1" have entirely different histories.
f744215c13
...
4896fee8d2
1 changed files with 0 additions and 6 deletions
|
|
@ -131,12 +131,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
else if (rruleStr.includes("FREQ=MONTHLY") && rruleStr.includes("BYDAY")) {
|
else if (rruleStr.includes("FREQ=MONTHLY") && rruleStr.includes("BYDAY")) {
|
||||||
const bydayMatch = rruleStr.match(/BYDAY=([^;]+)/);
|
const bydayMatch = rruleStr.match(/BYDAY=([^;]+)/);
|
||||||
if (bydayMatch) {
|
if (bydayMatch) {
|
||||||
const intervalMatch = rruleStr.match(/INTERVAL=(\d+)/);
|
|
||||||
const interval = intervalMatch ? parseInt(intervalMatch[1]) : 1;
|
|
||||||
const monthsFromStart = (year - startDate.getFullYear()) * 12 + (month - startDate.getMonth());
|
|
||||||
if (monthsFromStart < 0 || monthsFromStart % interval !== 0) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
const bydays = bydayMatch[1].split(',');
|
const bydays = bydayMatch[1].split(',');
|
||||||
const dayMap = {
|
const dayMap = {
|
||||||
'MO': 1, 'TU': 2, 'WE': 3, 'TH': 4, 'FR': 5, 'SA': 6, 'SU': 0
|
'MO': 1, 'TU': 2, 'WE': 3, 'TH': 4, 'FR': 5, 'SA': 6, 'SU': 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue