UK Holidays: Difference between revisions

From Skoll.CA
Jump to navigation Jump to search
remind>Fastfret79
(Added working Christmas & Boxing Day Bank Holiday Calcs)
m (5 revisions imported)
 
(3 intermediate revisions by one other user not shown)
Line 7: Line 7:
* The Bank Holiday date definitions are taken from [http://en.wikipedia.org/wiki/Bank_Holiday the Bank Holidays wikipedia page].
* The Bank Holiday date definitions are taken from [http://en.wikipedia.org/wiki/Bank_Holiday the Bank Holidays wikipedia page].
* The May, Spring and Summer bank holidays, and the Boxing day bank holiday aren't OMITs because they use <tt>weekday</tt> date specifiers, which generate an error ("Unknown token: `Mon' (OMIT)"). If anyone knows a way around this, please correct them.
* The May, Spring and Summer bank holidays, and the Boxing day bank holiday aren't OMITs because they use <tt>weekday</tt> date specifiers, which generate an error ("Unknown token: `Mon' (OMIT)"). If anyone knows a way around this, please correct them.
* If anyone can think of a way to add a reminder for Remembrance Sunday&mdash;defined as the Sunday nearest (before or after) the 11th of November&mdash;please add it.
 
* Can anyone think of rules to accommodate Christmas Day or New Years Day falling on a Sat or Sun? Eg. 27th/28th December 2010.  This is especially complex when Christmas Day is a Sat as Boxing Day becomes the following Mon and the Tue an additional Holiday.


<pre>
<pre>
Line 60: Line 59:
</pre>
</pre>


* The official government UK Bank Holidays can be found at the [http://www.dti.gov.uk/employment/bank-public-holidays/index.html UK Gov DTI site] includes Scotland and Northern Ireland.
* The official government UK Bank Holidays can be found at the [http://www.direct.gov.uk/en/Governmentcitizensandrights/LivingintheUK/DG_073741 UK DirectGov site] includes Scotland and Northern Ireland.


* UK Summertime (BST) is defined as starting at 0100 on the last Sunday March and ending at 0100 on the last Sunday of October.
Definitions for current UK Bank Holidays


Using these definitions for Summer Time
<pre>
REM Mon Tue Wed Thu Fri 1 Jan MSG New Year's Day Bank Holiday


<pre>
SET easter EASTERDATE(YEAR(TODAY()))


# British Summer Time
REM [trigger(easter-2)] MSG Good Friday Bank Holiday
# Untested but should work
REM [trigger(easter+1)] MSG Easter Monday Bank Holiday
REM Last Sunday of March AT 0100 MSG BST Begins (Clocks go Fowards 1hr)%
REM Last Sunday of October AT 0100 MSG BST Ends (Clocks go Backwards 1hr)%


</pre>
REM Mon 1 May MSG May Day Bank Holiday


UK Christmas Day & Boxing Day Bank Holiday
# Spring BH has been moved forward 1 week in 2012 to coincide with Jubilee
REM Mon 1 Jun --7 SATISFY year(trigdate()) != 2012
IF trigvalid()
        REM [trigdate()] MSG Spring Bank Holiday
ENDIF


<pre>
REM Mon 1 Sep --7 MSG Summer Bank Holiday


# First calculate the first weekday on or after 25th Dec
# First calculate the first weekday on or after 25th Dec
Line 88: Line 90:
#Set the next day (skipping Sat and Sun) to Boxing Day Bank Holiday
#Set the next day (skipping Sat and Sun) to Boxing Day Bank Holiday
REM [trigger(XmasBH+1)] OMIT Sat Sun AFTER MSG Boxing Day Bank Holiday
REM [trigger(XmasBH+1)] OMIT Sat Sun AFTER MSG Boxing Day Bank Holiday
REM 29 April 2011 MSG Royal Wedding Bank Holiday
REM 4 June 2012 MSG Spring Bank Holiday
REM 5 June 2012 MSG Queen's Diamond Jubilee Bank Holiday
</pre>
* UK Summertime (BST) is defined as starting at 0100 on the last Sunday March and ending at 0100 on the last Sunday of October.
Using these definitions for Summer Time
<pre>
# British Summer Time
REM Sunday 1 April --7 AT 01:00 MSG BST Begins (Clocks go Fowards 1 hour)
REM Sunday 1 November --7 AT 01:00 MSG BST Ends (Clocks go Backwards 1 hour)
</pre>
* Remembrance Sunday
Remembrance Sunday is the Sunday nearest the 11th of November. This is always the second Sunday in November, so it can also be thought of as the first Sunday on or after the 8th of November:
<pre>
REM Sun 8 Nov MSG Remembrance Sunday


</pre>
</pre>


[[Category:Remind]]
[[Category:Remind]]

Latest revision as of 09:19, 14 April 2021

Main article: Remind

These are some standard UK holidays in remind format, add them as an include in your .reminders file.

Some notes:

  • These are the England & Wales bank holidays, feel free to add the Scotland and Ireland ones.
  • The Bank Holiday date definitions are taken from the Bank Holidays wikipedia page.
  • The May, Spring and Summer bank holidays, and the Boxing day bank holiday aren't OMITs because they use weekday date specifiers, which generate an error ("Unknown token: `Mon' (OMIT)"). If anyone knows a way around this, please correct them.


OMIT 01 Jan MSG New Year's Day (Bank Holiday)%
REM Mon 1 May MSG May Day (Bank Holiday)%
REM Mon 1 Jun -7 MSG Spring Bank Holiday (Whitsun)%
REM Mon 1 Sep -7 MSG Summer Bank Holiday%

OMIT 25 Dec MSG Christmas Day%
# Boxing Day is the first weekday after Christmas
REM Mon Tue Wed Thu Fri 26 Dec MSG Boxing Day (Bank Holiday)%

# Easter stuff
SET easter EASTERDATE(YEAR(TODAY()))
OMIT [TRIGGER(easter-2)] MSG Good Friday (Bank Holiday)%
REM [TRIGGER(easter)] MSG Easter Sunday%
OMIT [TRIGGER(easter+1)] MSG Easter Monday (Bank Holiday)%

# Mother's Day is defined as the 4th Sunday of Lent. Lent begins on
# Ash Wednesday (easter-46), so the 4th Sunday is easter-21
REM [TRIGGER(easter-21)] MSG Mother's Day%

# other annual dates or holidays I want to be reminded of:
REM 25 Jan MSG Burns Night%
REM 14 Feb MSG Valentine's Day%
REM 01 Mar MSG St. David's Day%
REM 17 Mar MSG St. Patrick's Day%
REM 21 Apr MSG The Queen's Birthday (her actual birthday)%
REM 23 Apr MSG St. George's Day%
REM 08 May MSG VE Day%
REM Sun 15 Jun MSG Father's Day%
REM 31 Oct MSG Halloween%
REM 05 Nov MSG Bonfire Night%
REM 11 Nov MSG Rememberance Day%
REM 30 Nov MSG St. Andrew's Day%

# Western European Summer Time definitions. I'm not sure what the
# algorithm is for deciding these, so these are the mandated dates
# through to 2011. See the wikipedia page for details:
# http://en.wikipedia.org/wiki/Western_European_Summer_Time
REM 25 Mar 2007 British Summer Time begins (clocks go forward 1 hour)%
REM 28 Oct 2007 British Summer Time ends (clocks go back 1 hour)%
REM 30 Mar 2008 British Summer Time begins (clocks go forward 1 hour)%
REM 26 Oct 2008 British Summer Time ends (clocks go back 1 hour)%
REM 29 Mar 2009 British Summer Time begins (clocks go forward 1 hour)%
REM 25 Oct 2009 British Summer Time ends (clocks go back 1 hour)%
REM 28 Mar 2010 British Summer Time begins (clocks go forward 1 hour)%
REM 31 Oct 2010 British Summer Time ends (clocks go back 1 hour)%
REM 27 Mar 2011 British Summer Time begins (clocks go forward 1 hour)%
REM 30 Oct 2011 British Summer Time ends (clocks go back 1 hour)%
  • The official government UK Bank Holidays can be found at the UK DirectGov site includes Scotland and Northern Ireland.

Definitions for current UK Bank Holidays

REM Mon Tue Wed Thu Fri 1 Jan MSG New Year's Day Bank Holiday

SET easter EASTERDATE(YEAR(TODAY()))

REM [trigger(easter-2)] MSG Good Friday Bank Holiday
REM [trigger(easter+1)] MSG Easter Monday Bank Holiday

REM Mon 1 May MSG May Day Bank Holiday

# Spring BH has been moved forward 1 week in 2012 to coincide with Jubilee
REM Mon 1 Jun --7 SATISFY year(trigdate()) != 2012
IF trigvalid()
        REM [trigdate()] MSG Spring Bank Holiday
ENDIF

REM Mon 1 Sep --7 MSG Summer Bank Holiday

# First calculate the first weekday on or after 25th Dec
# Force it to current year otherwise it will search forward into next year
SET XmasBH evaltrig("Mon Tue Wed Thu Fri 25 Dec", date(year(today()), 12, 25))

#Set this date as Christmas Bank Holiday
REM [XmasBH] MSG Christmas Bank Holiday

#Set the next day (skipping Sat and Sun) to Boxing Day Bank Holiday
REM [trigger(XmasBH+1)] OMIT Sat Sun AFTER MSG Boxing Day Bank Holiday

REM 29 April 2011 MSG Royal Wedding Bank Holiday
REM 4 June 2012 MSG Spring Bank Holiday
REM 5 June 2012 MSG Queen's Diamond Jubilee Bank Holiday

  • UK Summertime (BST) is defined as starting at 0100 on the last Sunday March and ending at 0100 on the last Sunday of October.

Using these definitions for Summer Time


# British Summer Time
REM Sunday 1 April --7 AT 01:00 MSG BST Begins (Clocks go Fowards 1 hour)
REM Sunday 1 November --7 AT 01:00 MSG BST Ends (Clocks go Backwards 1 hour)

  • Remembrance Sunday

Remembrance Sunday is the Sunday nearest the 11th of November. This is always the second Sunday in November, so it can also be thought of as the first Sunday on or after the 8th of November:


REM Sun 8 Nov MSG Remembrance Sunday