<?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: 5-4-4 fiscal calendar, col formula or jsl script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/5-4-4-fiscal-calendar-col-formula-or-jsl-script/m-p/428265#M67758</link>
    <description>&lt;P&gt;That should get me until a 53 week year, and then it won't matter because the Armageddon will start. :&amp;gt;&lt;/img&gt;&amp;nbsp; Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 19 Oct 2021 15:54:26 GMT</pubDate>
    <dc:creator>Devin</dc:creator>
    <dc:date>2021-10-19T15:54:26Z</dc:date>
    <item>
      <title>5-4-4 fiscal calendar, col formula or jsl script</title>
      <link>https://community.jmp.com/t5/Discussions/5-4-4-fiscal-calendar-col-formula-or-jsl-script/m-p/427205#M67683</link>
      <description>&lt;P&gt;Has anyone written a column formula or script that will allow me to convert a date:time to a particular week or quarter in my company's OBSCURE fiscal calendar, known as the "5-4-4" fiscal calendar? I see google references to other fiscal calendars, but apparently the 5-4-4 is uncommon.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 20:47:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/5-4-4-fiscal-calendar-col-formula-or-jsl-script/m-p/427205#M67683</guid>
      <dc:creator>Devin</dc:creator>
      <dc:date>2023-06-10T20:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: 5-4-4 fiscal calendar, col formula or jsl script</title>
      <link>https://community.jmp.com/t5/Discussions/5-4-4-fiscal-calendar-col-formula-or-jsl-script/m-p/427285#M67684</link>
      <description>&lt;P&gt;From what I understand of that system you could just find the number of days from the start of a given year and then calculate the week and quarter based on the number of days and length of each quarter.&amp;nbsp; You might need to take into account 53 week years, but this should get you started:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Table( "Fiscal Week",
	Add Rows( 1000 ),
	New Column( "Date", Numeric, "Continuous", Format( "yyyy-mm-ddThh:mm:ss", 19, 0 ),
		Input Format( "yyyy-mm-ddThh:mm:ss", 0 ),
		Formula( Date DMY( 4, 1, 2021 ) + Row() * In Hours( 12 ) )
	),
	New Column( "Fiscal Year", Numeric, "Continuous", Format( "Best", 12 ),
		Formula(
			Floor( (:Date - Date DMY( 4, 1, 2021 )) / In Days( 52 * 7 ) ) + 2021
		)
	),
	New Column( "Fiscal Day of Year", Numeric, "Continuous", Format( "Best", 12 ),
		Formula(
			Floor( Mod( (:Date - Date DMY( 4, 1, 2021 )) / In Days( 1 ), 52 * 7 ) )
			 + 1
		),
		Set Display Width( 67 )
	),
	New Column( "Fiscal Week of Year", Numeric, "Continuous", Format( "Best", 12 ),
		Formula( Floor( (:Fiscal Day of Year - 1) / 7 ) + 1 ),
		Set Display Width( 85 )
	),
	New Column( "Fiscal Quarter", Numeric, "Continuous", Format( "Best", 12 ),
		Formula( Floor( (:Fiscal Week of Year - 1) / 13 ) + 1 ),
		Set Display Width( 65 )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Oct 2021 21:18:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/5-4-4-fiscal-calendar-col-formula-or-jsl-script/m-p/427285#M67684</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-10-15T21:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: 5-4-4 fiscal calendar, col formula or jsl script</title>
      <link>https://community.jmp.com/t5/Discussions/5-4-4-fiscal-calendar-col-formula-or-jsl-script/m-p/428265#M67758</link>
      <description>&lt;P&gt;That should get me until a 53 week year, and then it won't matter because the Armageddon will start. :&amp;gt;&lt;/img&gt;&amp;nbsp; Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 15:54:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/5-4-4-fiscal-calendar-col-formula-or-jsl-script/m-p/428265#M67758</guid>
      <dc:creator>Devin</dc:creator>
      <dc:date>2021-10-19T15:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: 5-4-4 fiscal calendar, col formula or jsl script</title>
      <link>https://community.jmp.com/t5/Discussions/5-4-4-fiscal-calendar-col-formula-or-jsl-script/m-p/428315#M67763</link>
      <description>&lt;P&gt;In fear of begging AND choosing, how would you do calc fiscal month? Thank you!&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 17:11:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/5-4-4-fiscal-calendar-col-formula-or-jsl-script/m-p/428315#M67763</guid>
      <dc:creator>Devin</dc:creator>
      <dc:date>2021-10-19T17:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: 5-4-4 fiscal calendar, col formula or jsl script</title>
      <link>https://community.jmp.com/t5/Discussions/5-4-4-fiscal-calendar-col-formula-or-jsl-script/m-p/428547#M67785</link>
      <description>&lt;P&gt;Well, if the week of the year is 1-5 it is the first month of the first quarter, if the week of the year is 23-26 then it is the sixth month (third month of the second quarter), etc. A big if statement would do the trick. That said, here is another way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Column( "Fiscal Month", Numeric, "Continuous", Format( "Best", 12 ),
	Formula(
		Week of Quarter = Modulo( :Fiscal Week of Year - 1, 13 ) + 1;
		Month of Quarter = If(
			Week of Quarter &amp;lt;= 5, 1,
			Week of Quarter &amp;lt;= 9, 2,
			3
		);
		Month of Quarter + (:Fiscal Quarter - 1) * 3;
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Oct 2021 11:38:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/5-4-4-fiscal-calendar-col-formula-or-jsl-script/m-p/428547#M67785</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-10-20T11:38:50Z</dc:date>
    </item>
  </channel>
</rss>

