Skip to content

Mexico's Federal Labour Law

The rule

Mexico’s Federal Labour Law (Ley Federal del Trabajo) sets, for a day shift (jornada diurna):

  • 8 hours a day and 48 a week; time past them is overtime (horas extra);
  • the first 9 hours of overtime in a week paid double (200%), and every hour past them triple (300%);
  • work on the weekly rest day (Sunday, unless agreed otherwise) paid double (200%) besides the rest day’s own pay, which the salary holds;
  • work on a Sunday paid a premium of 25% (prima dominical): 125% on an ordinary working Sunday, and 225% where Sunday is the rest day.

Who uses it

Employers in Mexico, and payroll providers for them.

How the recipe does it

Configuration only: the package (package.toml) has a layer, jornada, for everyone:

[[layer.step]]
id = "daily"
uses = "standard/threshold"
params = { window = "day", over = "8h", to = "overtime", counts = ["work"] }
[[layer.step]]
id = "weekly"
uses = "standard/threshold"
params = { window = "week", over = "48h", to = "overtime", counts = ["work"] }
[[layer.step]]
id = "triple"
uses = "standard/threshold"
params = { window = "week", over = "9h", to = "triple_time", counts = ["overtime"] }
[[layer.step]]
id = "rest-day"
uses = "standard/premium"
params = { weekdays = ["sunday"], counts = ["work"], category = "sunday_rest_day" }
[[layer.step]]
id = "wages"
uses = "standard/earnings"
params = { rate = "pay", measure = "wages", premiums = { work = 100, overtime = 200, triple_time = 300, sunday_rest_day = 225, rest_day = 200, sunday = 125 } }
  • The daily and weekly thresholds count only work: a day’s overtime is not counted toward the week’s 48 again.
  • triple counts the week’s overtime, from the day and the week alike, and moves what is past 9 hours, the latest first, to triple_time.
  • rest-day moves the ordinary time worked on the rest day’s workday to sunday_rest_day, paid 225%: double, and the Sunday premium on top. The rest day’s own pay is the weekly salary’s, paid whether the day is worked or not, so the recipe pays only what the work adds.
  • earnings prices each category at its per cent of the person’s pay rate.

Someone whose rest day is another day has a layer saying so, picked by the employment attribute rest_day: their rest day’s work is paid double, and their Sunday’s the premium alone.

[[layer]]
id = "rest-day-monday"
order = 10
applies_to = "attributes.rest_day = monday"
[[layer.step]]
id = "rest-day"
change = "params"
params = { weekdays = ["monday"], category = "rest_day" }
[[layer.step]]
id = "sunday"
uses = "standard/premium"
params = { weekdays = ["sunday"], counts = ["work"], category = "sunday" }
after = "rest-day"

What your setup needs

Set up before you adopt the recipe; the recipe’s steps read them by name, and adopting it is refused, with a list of what is missing, until they exist.

  • A measure called wages: the amount the recipe adds up (money in a currency, or a count).

The scenarios show each as it was set up for them.

Parameters

StepParameterMeaning
daily, weeklyover, countsThe day’s 8 hours and the week’s 48, counting work.
tripleover, counts, toThe week’s overtime paid double (9h), and where the rest goes.
rest-dayweekdays, counts, categoryThe rest day (Sunday; Monday in rest-day-monday), the time it takes, where it goes.
sunday (rest-day-monday)weekdays, counts, categoryA working Sunday’s hours, paid the Sunday premium.
wagespremiumsEach category’s per cent of the ordinary rate.

What the scenarios show

  • overtime-double-for-9-hours-a-week-then-triple: 15 hours of overtime in a week, 9 double and the latest 6 triple.
  • work-on-the-sunday-rest-day: 6 hours on Sunday at 225%.
  • a-rest-day-on-monday-and-a-working-sunday: Monday’s hours at 200%, Sunday’s at 125%.

This is a simplified form of the law’s general rule, for illustration. The night shift (7 hours) and the mixed shift (7 hours 30 minutes) have shorter days; overtime is limited to 3 hours a day and 3 days a week; collective agreements and reforms of the working week change these rules. Check the rules where you operate before relying on them.

Get the recipe

The recipe’s package and its scenarios are in the example packages repository: attendance/mexico_federal_labour_law. Test it, or your own copy of it, with hourctl attend test, and publish it with hourctl attend pkg publish.

The policy package

The package’s layers, with the standard steps each one runs and their settings:

mexico_federal_labour_law/package.toml
name = "mexico_federal_labour_law"
version = "1.0.0"
description = "Mexico's Federal Labour Law for a day shift: overtime past 8 hours a day or 48 a week, double for the first 9 hours of a week and triple after; work on the weekly rest day paid double on top of the day's pay, and the Sunday premium of 25%."
# What the tenant must have set up for the recipe: the steps read these by name.
[needs]
measures = ["wages"]
# Everyone: the day shift's 8 hours a day and 48 a week. Time past them is
# overtime (horas extra), paid double; past 9 hours of overtime in a week,
# triple. Work on the weekly rest day, Sunday, is paid double besides the
# rest day's own pay, and the Sunday premium (prima dominical) of 25% on
# top: 225% for each hour worked on it. The rates are per cents of the
# ordinary hourly rate.
[[layer]]
id = "jornada"
[[layer.step]]
id = "daily"
uses = "standard/threshold"
params = { window = "day", over = "8h", to = "overtime", counts = ["work"] }
[[layer.step]]
id = "weekly"
uses = "standard/threshold"
params = { window = "week", over = "48h", to = "overtime", counts = ["work"] }
[[layer.step]]
id = "triple"
uses = "standard/threshold"
params = { window = "week", over = "9h", to = "triple_time", counts = ["overtime"] }
[[layer.step]]
id = "rest-day"
uses = "standard/premium"
params = { weekdays = ["sunday"], counts = ["work"], category = "sunday_rest_day" }
[[layer.step]]
id = "wages"
uses = "standard/earnings"
params = { rate = "pay", measure = "wages", premiums = { work = 100, overtime = 200, triple_time = 300, sunday_rest_day = 225, rest_day = 200, sunday = 125 } }
# Those whose weekly rest day is Monday (the employment attribute
# rest_day): work on Monday is paid double, and work on Sunday, an
# ordinary working day for them, the Sunday premium alone.
[[layer]]
id = "rest-day-monday"
order = 10
applies_to = "attributes.rest_day = monday"
[[layer.step]]
id = "rest-day"
change = "params"
params = { weekdays = ["monday"], category = "rest_day" }
[[layer.step]]
id = "sunday"
uses = "standard/premium"
params = { weekdays = ["sunday"], counts = ["work"], category = "sunday" }
after = "rest-day"

Scenarios

Each scenario gives a person’s punches and setup and the timecard they must produce, worked out with this package adopted (the format).

Someone whose weekly rest day is Monday: Monday's 6 hours are paid double, 200%; Sunday is a working day for them, its 6 hours paid with the Sunday premium alone, 125%
scenarios/a-rest-day-on-monday-and-a-working-sunday.toml
description = "Someone whose weekly rest day is Monday: Monday's 6 hours are paid double, 200%; Sunday is a working day for them, its 6 hours paid with the Sunday premium alone, 125%"
punch = [
{ at = "2026-10-12 09:00", kind = "in" }, { at = "2026-10-12 15:00", kind = "out" },
{ at = "2026-10-18 09:00", kind = "in" }, { at = "2026-10-18 15:00", kind = "out" },
]
[policy]
zone = "America/Mexico_City"
[[employment]]
effective = "2026-01-05"
kind = "hired"
attributes = { rest_day = "monday" }
[[measure]]
id = "wages"
kind = "money"
currency = "MXN"
[[rate]]
kind = "pay"
amount = 5000
currency = "MXN"
[expect]
week = "2026-10-12"
allocations = [
"2026-10-12 09:00-15:00 rest_day 6.00",
"2026-10-18 09:00-15:00 sunday 6.00",
]
quantities = [
"2026-10-12 wages 600.00 MXN rest_day",
"2026-10-18 wages 375.00 MXN sunday",
]
Monday to Friday from 07:00 to 18:00 and Saturday from 07:00 to 15:00, at 50.00 an hour: 3 hours past 8 each weekday, 15 of overtime in the week. The first 9, Monday's to Wednesday's, are paid double; the 6 after them, Thursday's and Friday's, triple. The 48 ordinary hours are no weekly overtime
scenarios/overtime-double-for-9-hours-a-week-then-triple.toml
description = "Monday to Friday from 07:00 to 18:00 and Saturday from 07:00 to 15:00, at 50.00 an hour: 3 hours past 8 each weekday, 15 of overtime in the week. The first 9, Monday's to Wednesday's, are paid double; the 6 after them, Thursday's and Friday's, triple. The 48 ordinary hours are no weekly overtime"
punch = [
{ at = "2026-10-12 07:00", kind = "in" }, { at = "2026-10-12 18:00", kind = "out" },
{ at = "2026-10-13 07:00", kind = "in" }, { at = "2026-10-13 18:00", kind = "out" },
{ at = "2026-10-14 07:00", kind = "in" }, { at = "2026-10-14 18:00", kind = "out" },
{ at = "2026-10-15 07:00", kind = "in" }, { at = "2026-10-15 18:00", kind = "out" },
{ at = "2026-10-16 07:00", kind = "in" }, { at = "2026-10-16 18:00", kind = "out" },
{ at = "2026-10-17 07:00", kind = "in" }, { at = "2026-10-17 15:00", kind = "out" },
]
[policy]
zone = "America/Mexico_City"
[[measure]]
id = "wages"
kind = "money"
currency = "MXN"
[[rate]]
kind = "pay"
amount = 5000
currency = "MXN"
[expect]
week = "2026-10-12"
allocations = [
"2026-10-12 07:00-15:00 work 8.00",
"2026-10-12 15:00-18:00 overtime 3.00",
"2026-10-13 07:00-15:00 work 8.00",
"2026-10-13 15:00-18:00 overtime 3.00",
"2026-10-14 07:00-15:00 work 8.00",
"2026-10-14 15:00-18:00 overtime 3.00",
"2026-10-15 07:00-15:00 work 8.00",
"2026-10-15 15:00-18:00 triple_time 3.00",
"2026-10-16 07:00-15:00 work 8.00",
"2026-10-16 15:00-18:00 triple_time 3.00",
"2026-10-17 07:00-15:00 work 8.00",
]
quantities = [
"2026-10-14 wages 900.00 MXN overtime",
"2026-10-16 wages 900.00 MXN triple_time",
"2026-10-17 wages 2400.00 MXN work",
]
Sunday is the weekly rest day: its 6 hours, from 09:00 to 15:00, are paid double besides the day's own pay, with the Sunday premium of 25% on top, 225%: 675.00 at 50.00 an hour. Monday's 8 hours are ordinary
scenarios/work-on-the-sunday-rest-day.toml
description = "Sunday is the weekly rest day: its 6 hours, from 09:00 to 15:00, are paid double besides the day's own pay, with the Sunday premium of 25% on top, 225%: 675.00 at 50.00 an hour. Monday's 8 hours are ordinary"
punch = [
{ at = "2026-10-12 07:00", kind = "in" }, { at = "2026-10-12 15:00", kind = "out" },
{ at = "2026-10-18 09:00", kind = "in" }, { at = "2026-10-18 15:00", kind = "out" },
]
[policy]
zone = "America/Mexico_City"
[[measure]]
id = "wages"
kind = "money"
currency = "MXN"
[[rate]]
kind = "pay"
amount = 5000
currency = "MXN"
[expect]
week = "2026-10-12"
allocations = [
"2026-10-12 07:00-15:00 work 8.00",
"2026-10-18 09:00-15:00 sunday_rest_day 6.00",
]
quantities = [
"2026-10-12 wages 400.00 MXN work",
"2026-10-18 wages 675.00 MXN sunday_rest_day",
]