入っているもの
米国の家族・医療休暇法(FMLA)を、その規則である 29 CFR Part 825 のとおりに、ritsu の五つの言語で書いたものです。どのファイルも同じ休暇の一部分に答え、ritsu check がそれをつなげて確かめます。フローは、規則と期限と帳簿を、それぞれが宣言した型で呼びます。
2026-01-01 時点の節を転記したもので、原文と見比べて読むためのものです。法律の助言ではありません。
ここで決めて読んだところ
節が決めていないところは、どう決めたかを各ファイルのコメントに書きました。
- 営業日は、月曜から金曜のうち連邦の祝日を除いた日です。Part 825 は営業日を定めておらず、使用者によって違うことがあります。
- 期限は時刻ではなく日です。節は時刻を言わず、使用者は米国のどのタイムゾーンにもいます。また「やむを得ない事情」が無いときの日です。
- フローは、申し出のあった日に診断書を求めます。825.305(b) が認める日のうち、いちばん早い日です。
- 825.500(g) は、記録をだれが持つかを言っていません。ゲートでは、休暇の担当者と人事の専門職が読みます。
入っていないもの
- 使用者が法の対象か(825.104)、病状が「重い健康状態」にあたるか(825.113)。
- 航空機の乗務員(825.801〜825.803)、米国の外で働く従業員(825.105(b))、学校の従業員の特則(825.600〜825.604)。
- 同じ使用者に勤める配偶者が上限を分け合う場合(825.120(a)(3)、825.127(f))。
- 825.200(g) の合計の上限。帳簿は一つの期間に一つの上限を持ちます。825.200(f) の、対象となる軍人を介護するための 12 か月は、使用者が別の期間として名前を付けます。
- 825.200(b)(4) の、さかのぼって数える 12 か月。毎日動くので、別の形の帳簿が要ります。
- 有給休暇への振り替え(825.207)と、州の休暇法。
- 従業員が自分の記録をどこまで見られるか。この項は言っていません。
使い方
モジュールを依存に足し、このモジュールと holidays の署名を確かめる行を ritsu.mod に書いて、取ってきます。
$ ritsu mod add fmla ghcr.io/i2y/ritsu-fmla@1.0.0
signature "ghcr.io/i2y/ritsu-fmla" by matching "^https://github[.]com/i2y/ritsu/" issuer "https://token.actions.githubusercontent.com"
signature "ghcr.io/i2y/ritsu-holidays" by matching "^https://github[.]com/i2y/ritsu/" issuer "https://token.actions.githubusercontent.com"
$ ritsu mod fetch
あとは、自分のファイルから読みます。
use rule eligibility from "@fmla/fmla_eligibility.rule"
use dates deadlines from "@fmla/fmla_deadlines.cal"
use book leave from "@fmla/fmla_leave.book"
フローのキューを通るタスクは Temporal で動きます。ritsu gen --target temporal-typescript(temporal-python、temporal-go も)で書き出せます。ゲートの決まりは ritsu gen --target cedar で Cedar になります。
出典
sources/law/ に、eCFR が配ったままの節を置いています。規則は読む三つの節を SHA-256 で固定し、rulec source outdated <ファイル> が新しい改正が出ていないかを eCFR に問い合わせます。koyomi、chobo、dandori、sekisho のファイルには eCFR の節を固定する行がありません。コメントに節の名前を書き、横のコピーがそのとき読んだものです。一覧は THIRD_PARTY_NOTICES.md にあります。
ライセンスは、ritsu と同じく MIT License か Apache License 2.0 のどちらかを選べます。
版
法令の改正に合わせた版はマイナーバージョンを上げます。言語のファイルの名前を変える版や消す版、ファイルが受け取るものや返すものを変える版は、メジャーバージョンを上げます。
カレンダー 1 個、日付の計算 1 本、規則 2 本、ワークフロー 1 本、帳簿 1 個、ゲート 1 個
ページは、この版のファイルからそれぞれの言語が描きました。
Monday to Friday, less the federal holidays of the United States. 29 CFR 825 does not define a business day: an employer's own may differ
- 知っている日
2021-01-01 〜 2030-12-31
- 表
- @holidays/us/data/federal_holidays.csv の 110 行
- 固定した版
sha256:194cb4a1ff46ed4b
- 読むカレンダー
federal_holidays
試すコードを読む
The last day for the notices of FMLA leave: five business days for the eligibility and the designation notice, 15 calendar days for a certification. From 29 CFR 825.300(b), 825.300(d) and 825.305(b)
- 知っている日
2021-01-01 〜 2030-12-31
- 表
- @holidays/us/data/federal_holidays.csv の 110 行
- 固定した版
sha256:194cb4a1ff46ed4b
- 読むカレンダー
federal_holidays
コードを読む
Whether an employee of a covered employer is eligible for FMLA leave, and the first reason why not. Transcribed from 29 CFR 825.110(a)
- 入力
- months_employed (0〜720); hours_of_service (0〜8,784); employees_within_75_miles (0〜10,000,000)
- 出力
- eligible; why_not (not_applicable, under_12_months, under_1250_hours, under_50_employees)
- 出典
- 29 CFR 825(2026-01-01 時点)
試すコードを読む
How many workweeks of FMLA leave a reason gives in a 12-month period, and how many minutes they are of an employee's own workweek. Transcribed from 29 CFR 825.200 and 825.205(b)
- 入力
- reason (birth, placement, care_for_family, own_condition, qualifying_exigency, servicemember_care); usual_week (1〜10,080 min)
- 出力
- workweeks (12〜26); entitled (12〜262,080 min)
- 出典
- 29 CFR 825(2026-01-01 時点)
試すコードを読む
An employee asks for FMLA leave: the eligibility notice, the certification, the designation, and the leave held in the book until it is taken. From 29 CFR 825.300 and 825.305
コードを読む
The FMLA leave an employee has left in a 12-month period, in minutes: it starts at what the employee is entitled to, and a designation holds what will be taken
- 勘定
leave entitled taken
- 振替
entitle designate
コードを読む
Who may learn what from the medical records of FMLA leave, and who may contact the health care provider. From 29 CFR 825.500(g) and 825.307(a)
- 役割
leave_administrator human_resources_professional management_official health_care_provider supervisor first_aid government_official
- 操作
read_medical_file read_restrictions read_emergency_condition read_relevant_information contact_provider
コードを読む