使い方などまだ考えていないからとりあえず該当月の祝日を出力してもらう。以降、ざっくり検証しかしていないデータマクロのメモ(xml)
Office365上で実行すると1秒弱かかっているから、WebフォームのUIマクロかWebマクロで実行できるかどうかも検討してみよう。
<?xml version="1.0" encoding="UTF-16" standalone="no"?> <DataMacros xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application"> <DataMacro Name="GetHolidayJp"> <Parameters> <Parameter Name="paramDate" Description="GetHolidayJp" /> </Parameters> <Statements> <StatementGroup Collapsed="true" Description="Initialize"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">""</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclYear</Argument> <Argument Name="Value">Year([paramDate])</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclMonth</Argument> <Argument Name="Value">Month([paramDate])</Argument> </Action> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclYear]<1948 Or [lclMonth]=6 Or [lclMonth]=8</Condition> <Statements> <Action Collapsed="true" Name="SetReturnVar"> <Argument Name="Name">GetHolidayJp</Argument> <Argument Name="Value">""</Argument> </Action> <Action Name="StopMacro" /> </Statements> </If> </ConditionalBlock> </Statements> </StatementGroup> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclMonth]=1</Condition> <Statements> <StatementGroup Collapsed="true" Description="元旦"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],1,1)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime(IIf(Weekday([lclDate])=1,[lclDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </StatementGroup> <StatementGroup Collapsed="true" Description="成人の日"> <Statements> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclYear]<=1999</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],1,15)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & FormatDateTime(IIf(Weekday([lclDate])=1,[ldlDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </If> <Else Collapsed="true"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],1,1)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclWD</Argument> <Argument Name="Value">Weekday([lclDate])</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & FormatDateTime([lcldate]+9+IIf([lclWD]>2,1,0)*7-[lclWD],2)</Argument> </Action> </Statements> </Else> </ConditionalBlock> </Statements> </StatementGroup> <Action Collapsed="true" Name="SetReturnVar"> <Argument Name="Name">GetHolidayJp</Argument> <Argument Name="Value">[lclHoliday]</Argument> </Action> <Action Name="StopMacro" /> </Statements> </If> </ConditionalBlock> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclMonth]=2</Condition> <Statements> <StatementGroup Collapsed="true" Description="建国記念の日"> <Statements> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclYear]>=1967</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],2,11)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & FormatDateTime(IIf(Weekday([lclDate])=1,[lclDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </If> </ConditionalBlock> </Statements> </StatementGroup> <Action Collapsed="true" Name="SetReturnVar"> <Argument Name="Name">GetHolidayJp</Argument> <Argument Name="Value">[lclHoliday]</Argument> </Action> <Action Name="StopMacro" /> </Statements> </If> </ConditionalBlock> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclMonth]=3</Condition> <Statements> <StatementGroup Collapsed="true" Description="春分の日"> <Statements> <ConditionalBlock> <If> <Condition>[lclYear]<=2150</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclYearS</Argument> <Argument Name="Value">[lclYear]-1980</Argument> </Action> <ConditionalBlock> <If> <Condition>[lclYear]<=1979</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDay</Argument> <Argument Name="Value">Int(20.8357+(0.242194*[lclYearS])-Int([lclYearS]/4))</Argument> </Action> </Statements> </If> <ElseIf> <Condition>[lclYear]<=2099</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDay</Argument> <Argument Name="Value">Int(20.8431+(0.242194*[lclYearS])-Int([lclYearS]/4))</Argument> </Action> </Statements> </ElseIf> <Else Collapsed="true"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDay</Argument> <Argument Name="Value">Int(20.851+(0.242194*[lclYearS])-Int([lclYearS]/4))</Argument> </Action> </Statements> </Else> </ConditionalBlock> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],3,[lclDay])</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime(IIf(Weekday([lclDate])=1,[lclDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </If> </ConditionalBlock> </Statements> </StatementGroup> <Action Collapsed="true" Name="SetReturnVar"> <Argument Name="Name">GetHolidayJp</Argument> <Argument Name="Value">[lclHoliday]</Argument> </Action> <Action Name="StopMacro" /> </Statements> </If> </ConditionalBlock> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclMonth]=4</Condition> <Statements> <StatementGroup Collapsed="true" Description="昭和の日"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],4,29)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime(IIf(Weekday([lclDate])=1,[lclDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </StatementGroup> <Action Collapsed="true" Name="SetReturnVar"> <Argument Name="Name">GetHolidayJp</Argument> <Argument Name="Value">[lclHoliday]</Argument> </Action> <Action Name="StopMacro" /> </Statements> </If> </ConditionalBlock> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclMonth]=5</Condition> <Statements> <ConditionalBlock> <If> <Condition>[lclYear]>=2007</Condition> <Statements> <StatementGroup Collapsed="true" Description="2007以降"> <Statements> <ConditionalBlock> <If> <Condition>Weekday(DateSerial([lclYear],5,3))=1</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime(DateSerial([lclYear],5,4),2)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & FormatDateTime(DateSerial([lclYear],5,5),2)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & FormatDateTime(DateSerial([lclYear],5,6),2)</Argument> </Action> </Statements> </If> <ElseIf> <Condition>Weekday(DateSerial([lclYear],5,4))=1</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime(DateSerial([lclYear],5,3),2)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & FormatDateTime(DateSerial([lclYear],5,5),2)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & FormatDateTime(DateSerial([lclYear],5,6),2)</Argument> </Action> </Statements> </ElseIf> <Else> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime(DateSerial([lclYear],5,3),2)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & FormatDateTime(DateSerial([lclYear],5,4),2)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],5,5)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & FormatDateTime(IIf(Weekday([lclDate])=1,[lclDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </Else> </ConditionalBlock> </Statements> </StatementGroup> </Statements> </If> <ElseIf> <Condition>[lclYear]>=1986</Condition> <Statements> <StatementGroup Collapsed="true" Description="1986から2006"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate3</Argument> <Argument Name="Value">DateSerial([lclYear],5,3)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate4</Argument> <Argument Name="Value">DateSerial([lclYear],5,4)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate5</Argument> <Argument Name="Value">DateSerial([lclYear],5,5)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">WD3</Argument> <Argument Name="Value">Weekday(DateSerial([lclYear],5,3))</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime(IIf([WD3]=1,[lclDate4],[lclDate3]),2)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & IIf([WD3]>1 And [WD3]<7,FormatDateTime([lclDate4]),"")</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & FormatDateTime(IIf(Weekday([lclDate5])=1,[lclDate5]+1,[lclDate5]),2)</Argument> </Action> </Statements> </StatementGroup> </Statements> </ElseIf> <Else> <Statements> <StatementGroup Collapsed="true" Description="1985以前"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],5,3)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime(IIf(Weekday([lclDate])=1,[lclDate]+1,[lclDate]),2)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],5,5)</Argument> </Action> <Action Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & FormatDateTime(IIf(Weekday([lclDate])=1,[lclDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </StatementGroup> </Statements> </Else> </ConditionalBlock> <Action Collapsed="true" Name="SetReturnVar"> <Argument Name="Name">GetHolidayJp</Argument> <Argument Name="Value">[lclHoliday]</Argument> </Action> <Action Name="StopMacro" /> </Statements> </If> </ConditionalBlock> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclMonth]=7</Condition> <Statements> <StatementGroup Collapsed="true" Description="海の日"> <Statements> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclYear]>=2003</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],7,1)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclWD</Argument> <Argument Name="Value">Weekday([lclDate])</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime([lcldate]+16+IIf([lclWD]>2,1,0)*7-[lclWD],2)</Argument> </Action> </Statements> </If> <ElseIf Collapsed="true"> <Condition>[lclYear]>=1996</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],7,20)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime(IIf(Weekday([lclDate])=1,[lclDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </ElseIf> </ConditionalBlock> </Statements> </StatementGroup> <Action Collapsed="true" Name="SetReturnVar"> <Argument Name="Name">GetHolidayJp</Argument> <Argument Name="Value">[lclHoliday]</Argument> </Action> <Action Name="StopMacro" /> </Statements> </If> </ConditionalBlock> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclMonth]=9</Condition> <Statements> <ConditionalBlock> <If> <Condition>[lclYear]>=2003</Condition> <Statements> <StatementGroup Collapsed="true" Description="敬老の日"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],9,1)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclWD</Argument> <Argument Name="Value">Weekday([lclDate])</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDateK</Argument> <Argument Name="Value">[lcldate]+16+IIf([lclWD]>2,1,0)*7-[lclWD]</Argument> </Action> </Statements> </StatementGroup> <StatementGroup Collapsed="true" Description="秋分の日"> <Statements> <ConditionalBlock> <If> <Condition>[lclYear]<=2150</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclYearS</Argument> <Argument Name="Value">[lclYear]-1980</Argument> </Action> <ConditionalBlock> <If> <Condition>[lclYear]<=1979</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDay</Argument> <Argument Name="Value">Int(23.2588+(0.242194*[lclYearS])-Int([lclYearS]/4))</Argument> </Action> </Statements> </If> <ElseIf> <Condition>[lclYear]<=2099</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDay</Argument> <Argument Name="Value">Int(23.2488+(0.242194*[lclYearS])-Int([lclYearS]/4))</Argument> </Action> </Statements> </ElseIf> <Else Collapsed="true"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDay</Argument> <Argument Name="Value">Int(24.2488+(0.242194*[lclYearS])-Int([lclYearS]/4))</Argument> </Action> </Statements> </Else> </ConditionalBlock> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDateS</Argument> <Argument Name="Value">DateSerial([lclYear],9,[lclDay])</Argument> </Action> </Statements> </If> </ConditionalBlock> </Statements> </StatementGroup> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime([lclDateK],2) & IIf([lclDateS]-[lclDateK]=2,FormatDateTime([lclDateK]+1,2),"") & FormatDateTime([lclDateS],2)</Argument> </Action> </Statements> </If> <Else Collapsed="true"> <Statements> <StatementGroup Collapsed="true" Description="敬老の日"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],9,15)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime(IIf(Weekday([lclDate])=1,[lclDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </StatementGroup> <StatementGroup Collapsed="true" Description="秋分の日"> <Statements> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclYear]<=2150</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclYearS</Argument> <Argument Name="Value">[lclYear]-1980</Argument> </Action> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclYearS]<=1979</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDay</Argument> <Argument Name="Value">Int(23.2588+(0.242194*[lclYearS])-Int([lclYearS]/4))</Argument> </Action> </Statements> </If> <ElseIf Collapsed="true"> <Condition>[lclYearS]<=2099</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDay</Argument> <Argument Name="Value">Int(23.2488+(0.242194*[lclYearS])-Int([lclYearS]/4))</Argument> </Action> </Statements> </ElseIf> <Else Collapsed="true"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDay</Argument> <Argument Name="Value">Int(24.2488+(0.242194*[lclYearS])-Int([lclYearS]/4))</Argument> </Action> </Statements> </Else> </ConditionalBlock> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],3,[lclDay])</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & FormatDateTime(IIf(Weekday([lclDate])=1,[lclDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </If> </ConditionalBlock> </Statements> </StatementGroup> </Statements> </Else> </ConditionalBlock> <Action Collapsed="true" Name="SetReturnVar"> <Argument Name="Name">GetHolidayJp</Argument> <Argument Name="Value">[lclHoliday]</Argument> </Action> <Action Name="StopMacro" /> </Statements> </If> </ConditionalBlock> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclMonth]=10</Condition> <Statements> <StatementGroup Collapsed="true" Description="体育の日"> <Statements> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclYear]<=1999</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],10,10)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime(IIf(Weekday([lclDate])=1,[ldlDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </If> <Else Collapsed="true"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],10,1)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclWD</Argument> <Argument Name="Value">Weekday([lclDate])</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime([lcldate]+9+IIf([lclWD]>2,1,0)*7-[lclWD],2)</Argument> </Action> </Statements> </Else> </ConditionalBlock> </Statements> </StatementGroup> <Action Collapsed="true" Name="SetReturnVar"> <Argument Name="Name">GetHolidayJp</Argument> <Argument Name="Value">[lclHoliday]</Argument> </Action> <Action Name="StopMacro" /> </Statements> </If> </ConditionalBlock> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclMonth]=11</Condition> <Statements> <StatementGroup Collapsed="true" Description="文化の日"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],11,3)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime(IIf(Weekday([lclDate])=1,[ldlDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </StatementGroup> <StatementGroup Collapsed="true" Description="勤労感謝の日"> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],11,23)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">[lclHoliday] & FormatDateTime(IIf(Weekday([lclDate])=1,[ldlDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </StatementGroup> <Action Collapsed="true" Name="SetReturnVar"> <Argument Name="Name">GetHolidayJp</Argument> <Argument Name="Value">[lclHoliday]</Argument> </Action> <Action Name="StopMacro" /> </Statements> </If> </ConditionalBlock> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclMonth]=12</Condition> <Statements> <StatementGroup Collapsed="true" Description="天皇誕生日"> <Statements> <ConditionalBlock> <If Collapsed="true"> <Condition>[lclYear]>=1989</Condition> <Statements> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclDate</Argument> <Argument Name="Value">DateSerial([lclYear],12,23)</Argument> </Action> <Action Collapsed="true" Name="SetLocalVar"> <Argument Name="Name">lclHoliday</Argument> <Argument Name="Value">FormatDateTime(IIf(Weekday([lclDate])=1,[ldlDate]+1,[lclDate]),2)</Argument> </Action> </Statements> </If> </ConditionalBlock> </Statements> </StatementGroup> <Action Collapsed="true" Name="SetReturnVar"> <Argument Name="Name">GetHolidayJp</Argument> <Argument Name="Value">[lclHoliday]</Argument> </Action> <Action Name="StopMacro" /> </Statements> </If> </ConditionalBlock> </Statements> </DataMacro> </DataMacros>
5月がおかしい。直してみた。
正確に言うと祝日ではなくて、日曜日を除く休日
振替休日は1973年以降のロジック忘れてた。←まだ
春分秋分のロジック←修正
0 件のコメント:
コメントを投稿