<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: What does +1 mean in this week definition? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-does-1-mean-in-this-week-definition/m-p/942406#M45192</link>
    <description>&lt;P&gt;The &lt;CODE&gt;+1&lt;/CODE&gt; in the week definition is indeed meant to add an additional week to the current week number. This is typically used to create a label or identifier for the next week, as in the example &lt;CODE&gt;wk36&lt;/CODE&gt; when the current week is &lt;CODE&gt;wk35&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;However, since 2024 has 52 weeks, adding 1 to the last week of the year (&lt;CODE&gt;week 52&lt;/CODE&gt;) would result in &lt;CODE&gt;week 53&lt;/CODE&gt;, which might not be valid depending on how your system or application handles week numbers. If &lt;CODE&gt;week(date)&lt;/CODE&gt; returns 52 and you add 1, it might result in an invalid week number, leading to potential issues.&lt;/P&gt;&lt;P&gt;If the &lt;CODE&gt;+1&lt;/CODE&gt; is not intentional (e.g., if you don't actually need to reference the next week), it might indeed be a copy-paste mistake. You could consider removing the &lt;CODE&gt;+1&lt;/CODE&gt; if your intention is to use the current week number without incrementing it.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2024 01:11:24 GMT</pubDate>
    <dc:creator>Sarath_A_SAS</dc:creator>
    <dc:date>2024-09-04T01:11:24Z</dc:date>
    <item>
      <title>What does +1 mean in this week definition?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-does-1-mean-in-this-week-definition/m-p/942122#M45182</link>
      <description>&lt;PRE&gt;&lt;CODE class=""&gt;if year="2024" then do;
	wk1=(compress('wk'||put(week(date) + 1,z2.)));
	wk2=compress(substr(year,3,2)||'_'||wk1);
  end;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What does the "+1" mean? I thought it was to add an additional week but 2024 has 52 weeks.&amp;nbsp; Or maybe this is just copy and pasted wrong in my program.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 00:38:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-does-1-mean-in-this-week-definition/m-p/942122#M45182</guid>
      <dc:creator>Deesee</dc:creator>
      <dc:date>2024-09-02T00:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: What does +1 mean in this week definition?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-does-1-mean-in-this-week-definition/m-p/942136#M45183</link>
      <description>You're correct about what +1 does.  But we have no way to know whether this is a smart thing to do.  We can't see the data or the purpose of the program.</description>
      <pubDate>Mon, 02 Sep 2024 04:35:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-does-1-mean-in-this-week-definition/m-p/942136#M45183</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2024-09-02T04:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: What does +1 mean in this week definition?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-does-1-mean-in-this-week-definition/m-p/942137#M45184</link>
      <description>&lt;P&gt;How many other "years" have this conditional code?&lt;/P&gt;
&lt;P&gt;Look in the online documentation for the WEEK function and the U, V and W modifiers. This may have been a similar adjustment to the weeks in a given year based on the starting day and/or leap day adjustments by someone that doesn't know other tools exist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone dealing with character year values already has one strike against them as far as I am concerned when in comes to thinking the code is "good".&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 05:19:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-does-1-mean-in-this-week-definition/m-p/942137#M45184</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-02T05:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: What does +1 mean in this week definition?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-does-1-mean-in-this-week-definition/m-p/942406#M45192</link>
      <description>&lt;P&gt;The &lt;CODE&gt;+1&lt;/CODE&gt; in the week definition is indeed meant to add an additional week to the current week number. This is typically used to create a label or identifier for the next week, as in the example &lt;CODE&gt;wk36&lt;/CODE&gt; when the current week is &lt;CODE&gt;wk35&lt;/CODE&gt;.&lt;/P&gt;&lt;P&gt;However, since 2024 has 52 weeks, adding 1 to the last week of the year (&lt;CODE&gt;week 52&lt;/CODE&gt;) would result in &lt;CODE&gt;week 53&lt;/CODE&gt;, which might not be valid depending on how your system or application handles week numbers. If &lt;CODE&gt;week(date)&lt;/CODE&gt; returns 52 and you add 1, it might result in an invalid week number, leading to potential issues.&lt;/P&gt;&lt;P&gt;If the &lt;CODE&gt;+1&lt;/CODE&gt; is not intentional (e.g., if you don't actually need to reference the next week), it might indeed be a copy-paste mistake. You could consider removing the &lt;CODE&gt;+1&lt;/CODE&gt; if your intention is to use the current week number without incrementing it.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 01:11:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/What-does-1-mean-in-this-week-definition/m-p/942406#M45192</guid>
      <dc:creator>Sarath_A_SAS</dc:creator>
      <dc:date>2024-09-04T01:11:24Z</dc:date>
    </item>
  </channel>
</rss>

