Hi there! first time poster -
I am trying to create a business day calculator that checks a table I created with relevant federal holidays and adjusts its business days accordingly.
I may be missing something very obvious but this is what i have so far and am actively working on its
{formdate: MM/DD/YYYY; name=start_date; default={time: MM/DD/YYYY}}
Days:{formtext: name=Business_Days_to_Add; default=5}
{formtoggle: name=business_days; default=yes}{endformtoggle}{formtoggle: name=calendar_days; default=yes}{endformtoggle}
{dbselect: SELECT Date, Name FROM FederalHolidays; space=xxxx; multiple=yes; menu=yes}
{currentDate={time: MM/DD/YYYY; at={=start_date}; pattern=MM/DD/YYYY}}
{businessDaysToAdd=business_days_to_add}
{addedDays=0}
{holidays=split(date, "")}
{if: business_days=yes}Business Days
{time: MM/DD/YYYY; shift={=businessdaystoadd}D(skip=SAT,SUN)}{endif}
{if: calendar_days=yes}Calendar Days
{time: MM/DD/YYYY; shift={=businessdaystoadd}D}{endif}
{if: business_days=yes}{repeat: business_days_to_add}{currentDate={time: MM/DD/YYYY; at={=currentdate}; pattern=MM/DD/YYYY}}{dayOfWeek={time: MM/DD/YYYY; at={=currentdate}; pattern=MM/DD/YYYY}}{isHoliday=includes(holidays, currentDate)}{endrepeat}{endif}