1import{_ as t,r as o,o as i,c,b as e,d as n,e as r,a}from"./app.2e23a6dc.js";const d={},l=a('<h1 id="recurrences" tabindex="-1"><a class="header-anchor" href="#recurrences" aria-hidden="true">#</a> Recurrences</h1><p>The <code>CalendarRecurrence</code> object specifies how often the event is supposed to occur. Some examples of this could be:</p><ul><li>an event that occurs once every Friday</li><li>an event that occurs every other week</li><li>an event that occurs daily for five days</li></ul><p>Recurrence is <strong>optional</strong>.</p><div class="custom-container warning"><p class="custom-container-title">Note</p><p>This feature is not supported in Yahoo or Outlook online calendars.</p></div><h2 id="frequency" tabindex="-1"><a class="header-anchor" href="#frequency" aria-hidden="true">#</a> frequency</h2><ul><li>Type: <code>string</code></li><li>Required: no</li><li>Valid value: any of <code>DAILY</code>, <code>WEEKLY</code>, <code>MONTHLY</code>, or <code>YEARLY</code></li></ul><p>The Julian interval of how often this event should occur. The interval (i.e., the time between recurrences) is dictated by <a href="#interval"><code>interval</code></a>.</p><h2 id="interval" tabindex="-1"><a class="header-anchor" href="#interval" aria-hidden="true">#</a> interval</h2><ul><li>Type: <code>number</code></li><li>Required: no</li><li>Valid value: any positive integer</li></ul><p>The amount of time that will occur between recurrences. The scale of the time depends on <a href="#frequency"><code>frequency</code></a>.</p><div class="custom-container tip"><p class="custom-container-title">Examples</p><ul><li>An event that occurs once every day: <code>{ frequency: 'DAILY', interval: 1 }</code></li><li>An event that occurs once every second Friday: <code>{ frequency: 'WEEKLY', interval: 2 }</code></li><li>An event that occurs once every three months: <code>{ frequency: 'MONTHLY', interval: 3 }</code></li></ul></div><h2 id="count" tabindex="-1"><a class="header-anchor" href="#count" aria-hidden="true">#</a> count</h2><ul><li>Type: <code>number</code></li><li>Required: no</li><li>Valid value: any positive integer</li></ul><p>The maximum number of times the event should repeat.</p><div class="custom-container warning"><p class="custom-container-title">Important</p><p>If this parameter is specified in conjunction with <a href="#end"><code>end</code></a>, the recurrence will end either when <code>count</code> is completed, or when <code>end</code> occurs, whichever happens first.</p></div><h2 id="end" tabindex="-1"><a class="header-anchor" href="#end" aria-hidden="true">#</a> end</h2>',17),p={href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"Date",-1),h=e("li",null,"Required: no",-1),v=e("li",null,[n("Valid value: a valid "),e("code",null,"Date"),n(" reference")],-1),m=a(`<p>The latest date that this event may occur on.</p><div class="custom-container warning"><p class="custom-container-title">Important</p><p>If this parameter is specified in conjunction with <a href="#count"><code>count</code></a>, the recurrence will end either when <code>count</code> is completed, or when <code>end</code> occurs, whichever happens first.</p></div><h2 id="weekdays" tabindex="-1"><a class="header-anchor" href="#weekdays" aria-hidden="true">#</a> weekdays</h2><ul><li>Type: <code>string[]</code></li><li>Required: no</li><li>Valid value: an array containing any non-repeating strings of <code>SU</code>, <code>MO</code>, <code>TU</code>, <code>WE</code>, <code>TH</code>, <code>FR</code> or <code>SA</code>, optionally prefixed by an integer.</li></ul><p>The days of the week that the event should occur on. The interval (i.e., the time between recurrences) is dictated by <a href="#interval"><code>interval</code></a>.</p><p>These days may be prefixed with a non-zero integer to represent the occurrence to fall on the <code>n</code>th day. Negative integers may be used to represent the <code>n</code>th <em>last</em> day. Defaults to <code>1</code> if no integer prefix is specified.</p><div class="custom-container tip"><p class="custom-container-title">Examples</p><ul><li>The first Sunday of the month: <code>SU</code></li><li>The second Wednesday of the month: <code>2WE</code></li><li>The <em>last</em> Friday of the month: <code>-1FR</code></li><li>The <em>second-to-last</em> Thursday of the month: <code>-2TH</code></li></ul></div><div class="custom-container warning"><p class="custom-container-title">Important</p><ul><li>The <a href="#frequency"><code>frequency</code></a> parameter must be set to <code>WEEKLY</code> or <code>MONTHLY</code> for <code>weekdays</code> to take effect.</li><li>In <code>MONTHLY</code> mode, Yahoo! Calendar only supports one <strong>nonnegative</strong> weekday.</li></ul></div><div class="custom-container danger"><p class="custom-container-title">Caution when specifying weekdays using Yahoo! Calendar in MONTHLY mode</p><p>Only the first <strong>nonnegative</strong> <em>n</em>th-day(s) prefix is taken into account, and used for the rest of the days of the week specified.</p><p>For example, if you pass in <code>['2FR', '1TU']</code> (every second Friday and every first Tuesday), it would fall back to <code>['2FR', 'TU</code>]\` (<strong>every second Friday</strong> <em>and</em> <strong>every second Tuesday</strong>) instead.</p></div><h2 id="monthdays" tabindex="-1"><a class="header-anchor" href="#monthdays" aria-hidden="true">
1#</a> monthdays</h2><ul><li>Type: <code>number[]</code></li><li>Required: no</li><li>Valid value: an array of any non-repeating, positive integers between <code>1</code> and <code>31</code></li></ul><p>The days of the month that the event should occur on. The interval (i.e., the time between recurrences) is dictated by <a href="#interval"><code>interval</code></a>.</p><div class="custom-container warning"><p class="custom-container-title">Important</p><ul><li>The <a href="#frequency"><code>frequency</code></a> parameter must be set to <code>MONTHLY</code> for <code>monthdays</code> to take effect.</li><li>Non-existent days (e.g., February 30) will be ignored.</li></ul></div><h2 id="weekstart" tabindex="-1"><a class="header-anchor" href="#weekstart" aria-hidden="true">#</a> weekstart</h2><p>The day of the week to denote when the the week starts on.</p><h3 id="example-with-end-of-month-skipping" tabindex="-1"><a class="header-anchor" href="#example-with-end-of-month-skipping" aria-hidden="true">#</a> Example with end-of-month skipping</h3><p>An example where the days generated makes a difference because of <code>weekstart</code>:</p><div class="language-typescript line-numbers-mode" data-ext="ts"><pre class="language-typescript"><code><span class="token punctuation">{</span> 2 frequency<span class="token operator">:</span> <span class="token string">'WEEKLY'</span><span class="token punctuation">,</span> 3 interval<span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span> 4 count<span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span> 5 weekdays<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">'TU'</span><span class="token punctuation">,</span> <span class="token string">'SU'</span><span class="token punctuation">]</span><span class="token punctuation">,</span> 6 weekstart<span class="token operator">:</span> <span class="token string">'MO'</span> 7<span class="token punctuation">}</span> 8</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>This will generate a recurrence that occurs on August 5, 10, 19, and 24.</p><p>However, changing <code>weekstart</code> from <code>MO</code> to <code>SU</code>:</p><div class="language-typescript line-numbers-mode" data-ext="ts"><pre class="language-typescript"><code><span class="token punctuation">{</span> 9 frequency<span class="token operator">:</span> <span class="token string">'WEEKLY'</span><span class="token punctuation">,</span> 10 interval<span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span> 11 count<span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span> 12 weekdays<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">'TU'</span><span class="token punctuation">,</span> <span class="token string">'SU'</span><span class="token punctuation">]</span><span class="token punctuation">,</span> 13 weekstart<span class="token operator">:</span> <span class="token string">'SU'</span> 14<span class="token punctuation">}</span> 15</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>This will instead generate a recurrence that occurs on August 5, 10, 19, and 31.</p><h3 id="example-with-invalid-dates-ignored" tabindex="-1"><a class="header-anchor" href="#example-with-invalid-dates-ignored" aria-hidden="true">#</a> Example with invalid dates ignored</h3><p>In the following example, the invalid date of February 30 will be ignored.</p><div class="language-typescript line-numbers-mode" data-ext="ts"><pre class="language-typescript"><code><span class="token punctuation">{</span> 16 frequency<span class="token operator">:</span> <span class="token string">'MONTHLY'</span><span class="token punctuation">,</span> 17 interval<span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span> 18 count<span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span> 19 monthdays<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token number">15</span><span class="token punctuation">,</span> <span class="token number">30</span><span class="token punctuation">]</span><span class="token punctuation">,</span> 20 weekstart<span class="token operator">:</span> <span class="token string">'SU'</span> 21<span class="token punctuation">}</span> 22</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>This will generate recurrences on the following dates:</p><ul><li>January 15 and 30</li><li>February 15</li><li>March 15, 30</li></ul>`,27);function f(k,y){const s=o("ExternalLinkIcon");return i(),c("div",null,[l,e("ul",null,[e("li",null,[n("Type: "),e("a",p,[u,r(s)])]),h,v]),m])}const b=t(d,[["render",f],["__file","recurrence.html.vue"]]);export{b as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.