Did you know that you can enjoy many members-only features simply by quickly registering (no CAPTCHA!)?
Registering gives you access to our giveaways, forum features, increased search performance, access to our Download Library, create your own blog & gallery, and more!
Once you have registered, stop by in 'Hello World', and introduce yourself.
Posted 04 April 2015 - 08:31 PM
File Submitter: chucklyons
File Submitted: 04 Apr 2015
File Category: Premise
Contact: [email protected]
For those that use 123's Newscaster Module, this scriptmacro will calculate Easter (allegedly for many years to come) and creates a NewsEvent called 'Easter'
Unzip. Import. Go to Modules->Newscaster->Macros->CalculateEaster. Select 'Trigger' in the properties pane
Navigate to Media->Newscaster and you should see a NewEvent called 'Easter'.
(I'll prob need to add an autodelete or something so that it can force the recalculation)
Click here to download this file
Posted 07 April 2015 - 11:20 AM
FWIW, Newscaster includes the following: Module >Global>Globalscripts>gTimeDate.
gTimeDate contains 31 date, solar and lunar-related functions including "gGetEasterDay":
- function gIsDST(dDate)
- function gIsLeapYear (ByVal iYear)
- function gNthSomedayOfMonth(dDate, iNth, iDayOfWeek)
- function gLastSomedayOfMonth(dDate, iDayOfWeek)
- function gDaysInMonth(iMonth)
- function gWeeksInMonth(iMonth)
- function gWeekOfMonth(dDate)
- function gIsWeekday(dDate)
- function gInNthWeek(dDate, iNthWeek)
- function gInLastWeek(dDate)
- function gClockTime(dTime, b24Hour)
- function gTimeInRange(ByVal startTime, ByVal endTime)
- function gGetEasterDay(iYear, iEventID)
- function gIsEventDay(dDate, iEventID)
- function gRiseAndSetTimes(ByVal dDate, ByVal gLong, ByVal gLat, ByVal iTimeZone, ByVal iDST, ByVal sEvent, ByRef sRiseTime, ByRef sSetTime, ByRef sStatus)
- function gMoonsAge(ByVal dDate)
- function gModifiedJulianDate(Y, m, d, h)
- function gSinAlt(bIsSun, mjd0, hr, gLong, cphi, sphi)
- function gFractional(X)
- function gHrMn(ut, iDST)
- function gLMST(mjd, gLong)
- function gMoonPhase(iMoonAge)
- function gMoonPhaseName(iMoonPhaseNumber)
- function gGetSeasonStart(iSeasonNumber)
- function gGetSeasonEnd(iSeasonNumber)
- function gGetSeason
- function gGetSeasonName(iSeasonNumber)
- function gDayOfSeason
- function gWeekOfSeason
- function gWeeksInSeason(iSeasonNumber)
- function gDaysInSeason(iSeasonNumber)
- April Fools
- Black Friday, Fourth Friday of November
- Canada Day
- Columbus Day, Second Monday of October
- Easter, First Sunday after Full Moon after vernal equinox
- Easter Monday, First Monday after Easter
- Fathers Day, Third Sunday of June
- Good Friday, Friday before Easter
- Ground Hog
- Independence Day
- Labor Day, First Monday of September
- Mardi Gras, Forty-six days before Easter
- Martin Luther King Jr Day, Third Monday of January
- Memorial Day, Last Monday of May
- Mothers Day, Second Sunday of May
- New Years
- New Years Eve
- Palm Sunday, Sunday before Easter
- Presidents Day, Third Monday of February
- Saint Patricks
- Thanksgiving CAN, Second Monday in October
- Thanksgiving Day USA, Fourth Thursday of November
- Victoria Day, Last Monday before May 25th
Edited by 123, 07 April 2015 - 11:27 AM.
Posted 09 April 2015 - 10:18 AM
Fantastic! Now I can redo the WU module, as well! Finding all of those formulas must have taken quite a while..
Posted 05 May 2015 - 12:31 AM
123, given my rudimentary coding skills, as an example, how would I use the gDateTime in global to show Memorial Day in Newscaster?
Posted 05 May 2015 - 01:52 PM
Memorial Day is the last Monday in May so I'd use the "gLastSomedayInMonth" function. It returns the last "someday" (Sunday or Monday or etc) for a given month and year.
It takes two arguments:
This function is only interested in the month and year in "dDate". Just supply the first day of May (i.e. "5/1/2015").
"iDayOfWeek" follows VBScript's default convention of numbering the days of the week (i.e. Sunday=1). Therefore Monday is "2".
When is Memorial Day in 2018?
Answer = gLastSomedayOfMonth("5/1/2018", 2)
Answer is "5/28/2018".
Posted 05 May 2015 - 04:38 PM
And, what about Orthodox Easter? You have at least one Greek using this system.
All kidding aside, this is very cool!!! Great job!
Posted 12 May 2015 - 10:39 PM
Sooo...I took 123's Global 'gIsEventDay' and created a macro. So when you initialize, it creates all of the holidays in that function. I did find an equation for the Greek Orthodox Easter. I'll leave it up to those who are interested to verify the accuracy of the dates.
I'll post this weekend after I beat on it a bit more...and wait for a volunteer for the Greek Easter
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users