Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2

Author Topic: UK holiday entitlement & calculations  (Read 3720 times)

chenks

  • Kitizen
  • ****
  • Posts: 1106
UK holiday entitlement & calculations
« on: July 19, 2019, 03:44:12 PM »

so i've been using the gov.uk website for a bit to calcaulate holiday entitlements for starters and leavers - https://www.gov.uk/calculate-your-holiday-entitlement/y

it all works fine, however i though it would be handy to have the actual calculation formula sitting offline rather than having to use the website all the time. they don't seem to want to give out the formula though. has anyone ever managed to work out what it is? or a way to scrape it from the sit?
Logged

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: UK holiday entitlement & calculations
« Reply #2 on: July 19, 2019, 06:48:10 PM »

hmmm think you may have missed the point of the post.
it's not that i don't know that it's 5.6 weeks per year (or 28 days). it's what the formula is for working out what an entitlement is for a part year based on a specific start date etc.

the gov.uk gives you the number after you've asked all the questions, what i'm trying to scrape is what that actual formula is.

ie guys starts on 14 may 2019, holiday year starts on 1 jan 2019, works 5 days a week = 17.8 days (round up to 18).
Logged

gt94sss2

  • Kitizen
  • ****
  • Posts: 1281
Re: UK holiday entitlement & calculations
« Reply #3 on: July 19, 2019, 07:31:43 PM »

Without calculating it myself, I think one of the links above answers this:

Quote
The holiday entitlement of 5.6 weeks is equivalent to 12.07 per cent of hours worked. The 12.07 per cent figure is 5.6 weeks' holiday, divided by 46.4 weeks (52 weeks - 5.6 weeks) and multiplied by 100 = 12.07 per cent.

Logged

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: UK holiday entitlement & calculations
« Reply #4 on: July 20, 2019, 01:37:29 PM »

i don't think it does.
Logged

pooclah

  • Reg Member
  • ***
  • Posts: 151
Re: UK holiday entitlement & calculations
« Reply #5 on: July 20, 2019, 04:20:41 PM »


You don't say whether the staff are full or part time, but this basic PowerShell script should work for both and point you in the right direction.

Code: [Select]
$ww = 5 # Number of days worked per week (max 5)
$he = $ww * 5.6 # Calculate entitlement
$d1 = '2019-05-14' # Start date
$d2 = '2019-12-31' # End date /end of year
$ts = New-TimeSpan -Start $d1 -End $d2
$weeks = $ts.Days / 7
[math]::round($he / 52 * $weeks, 1)

Kevin
Logged

parkdale

  • Reg Member
  • ***
  • Posts: 597
Logged
Vodafone FTTC ECI cab 40/10Mb connection / Fritz!box7590

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: UK holiday entitlement & calculations
« Reply #7 on: July 21, 2019, 05:23:30 PM »

You don't say whether the staff are full or part time, but this basic PowerShell script should work for both and point you in the right direction.

Code: [Select]
$ww = 5 # Number of days worked per week (max 5)
$he = $ww * 5.6 # Calculate entitlement
$d1 = '2019-05-14' # Start date
$d2 = '2019-12-31' # End date /end of year
$ts = New-TimeSpan -Start $d1 -End $d2
$weeks = $ts.Days / 7
[math]::round($he / 52 * $weeks, 1)

Kevin

it would be all full time, but some are on 28 days (incl bank holidays) and some are on 33 days (incl bank holidays), but yeah all based on a 5 day working week.
Logged

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: UK holiday entitlement & calculations
« Reply #8 on: July 21, 2019, 05:26:17 PM »

Try this one https://www.moorepay.co.uk/blog/holiday-entitlement-calculations-made-easy/

that pages seems to base everything on someone starting on the 1st of each month or leaving at the end of each month, however if a person starts or leaves mid-month you must included the days for those part-months (as per government website). you are also not allowed to round down at any time, must always keep it as it is or round up (in reality it's always going to be rounded up unless it comes out as a full or half number).
Logged

pooclah

  • Reg Member
  • ***
  • Posts: 151
Re: UK holiday entitlement & calculations
« Reply #9 on: July 21, 2019, 07:51:30 PM »


it would be all full time, but some are on 28 days (incl bank holidays) and some are on 33 days (incl bank holidays), but yeah all based on a 5 day working week.

Sorry for the brief response but I'm pressed for time.

for 28 days use 5.6
for 33 days use 6.6

Hope that makes sense.
Logged

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: UK holiday entitlement & calculations
« Reply #10 on: July 22, 2019, 02:38:56 PM »

You don't say whether the staff are full or part time, but this basic PowerShell script should work for both and point you in the right direction.

Code: [Select]
$ww = 5 # Number of days worked per week (max 5)
$he = $ww * 5.6 # Calculate entitlement
$d1 = '2019-05-14' # Start date
$d2 = '2019-12-31' # End date /end of year
$ts = New-TimeSpan -Start $d1 -End $d2
$weeks = $ts.Days / 7
[math]::round($he / 52 * $weeks, 1)

Kevin

yeah that seems to give the same result as the gov website based on the various date starts i've tested.

now, would that also be able to tell me how many days they have accrued to date? ie it has the start date and the current date and works out how many days accrued so far?
Logged

pooclah

  • Reg Member
  • ***
  • Posts: 151
Re: UK holiday entitlement & calculations
« Reply #11 on: July 22, 2019, 07:23:47 PM »

    Yes, by putting in the holiday year start date or employees start date and the current date would give you entitlement to date.

    You've probably worked it out already but just

    • calculate the weeks worked so far
    • divide their entitlement by 52 then times by the weeks worked

    Kevin


Logged

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: UK holiday entitlement & calculations
« Reply #12 on: July 23, 2019, 07:49:27 AM »

i don't think that's quite right (unless i've mucked up the formula)

i just tried that formula based on someone leaving on 2nd august
gov website says 11.8 days, this formula gave 16.4 days

Code: [Select]
PS C:\Users\grays> $ww = 5 # Number of days worked per week (max 5)
>> $he = $ww * 5.6 # Calculate entitlement
>> $d1 = '2019-01-01' # Start date
>> $d2 = '2019-08-02' # End date /end of year
>> $ts = New-TimeSpan -Start $d1 -End $d2
>> $weeks = $ts.Days / 7
>> [math]::round($he / 52 * $weeks, 1)
16.4

« Last Edit: July 23, 2019, 02:21:40 PM by chenks »
Logged

pooclah

  • Reg Member
  • ***
  • Posts: 151
Re: UK holiday entitlement & calculations
« Reply #13 on: July 23, 2019, 09:30:34 PM »


The .gov site deducts bank holidays.

The basic script I provided just calculates entitlement based on weeks worked.  It's up to you to deduct bank holidays/days taken.

Kevin
Logged

chenks

  • Kitizen
  • ****
  • Posts: 1106
Re: UK holiday entitlement & calculations
« Reply #14 on: July 24, 2019, 02:21:59 PM »

does it deduct them? i can't see where it states that they are deducted.
the gov website uses 28 days as the base for the calculation.

banks holidays are included in the 28 (and 33 days) for the purposes of any calculations we do.
if people want the bank holidays off they have to take them as part of their holiday entitlement.
Logged
Pages: [1] 2
 

anything