概要
Off Day is a holiday alarm clock app on iOS. Users can easily and elegantly mark holidays and toggle alarms based on conditions using the built-in shortcuts in Off Day.
Web・アプリ開発できること
- Multi-layer day decision engine with deterministic priority: User Mark > Public Holiday Template > Base Calendar
- Built-in public holiday templates: China Mainland, Xinjiang, Tibet, Guangxi, Ningxia, Hong Kong, Macau (Public / Force / Civil Servant), Singapore, Thailand, Korea, Japan, United States
- Custom public holiday plans: create, edit, duplicate, import JSON, export JSON
- Subscription-based remote templates: subscribe via URL, background refresh, update review with diff comparison, accept/reject/pause
計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルEnglish | 中文
Off Day
No alarms on off days.
A holiday-aware iOS app for day classification, automation, and reminders.
Overview
Off Day helps users decide whether a day should be treated as an off day or a work day, then use that result in iOS Shortcuts and notification workflows.
The app is local-first:
- Holiday data is bundled as JSON templates or user-imported custom plans.
- User overrides, comments, and settings are stored in a local SQLite database.
- Optional iCloud backup is available for database snapshots.
Key Features
- Multi-layer day decision engine with deterministic priority:
User Mark > Public Holiday Template > Base Calendar - Built-in public holiday templates: China Mainland, Xinjiang, Tibet, Guangxi, Ningxia, Hong Kong, Macau (Public / Force / Civil Servant), Singapore, Thailand, Korea, Japan, United States
- Custom public holiday plans: create, edit, duplicate, import JSON, export JSON
- Subscription-based remote templates: subscribe via URL, background refresh, update review with diff comparison, accept/reject/pause
- Flexible base calendar modes: Standard weekly, Week-cycle, Day-cycle
- Rich App Intents for Shortcuts automation: check day type, check clash day, get day details, find next off/work day, update day mark, manage day comments
- Notification center for three scenarios: template expiration, upcoming public holidays, upcoming custom-mark days
- Lock Screen widget: side-by-side off/work status and holiday names for today and tomorrow, plus compact circular widgets for either day
- Backup and restore:
iCloud auto backup, manual database export/import (
.zip/.sqlite) - Localization support: English, Simplified Chinese, Traditional Chinese, Traditional Chinese (Hong Kong)
- Optional alternative calendar display: Chinese lunar / Kyureki data support
How Off Day Decides a Day Type
Off Day merges three data sources in fixed order:
- User mark (manual override)
- Public holiday template entry (including holiday shifts)
- Base calendar configuration
Equivalent logic:
finalDayType = userMark ?? publicHolidayType ?? baseCalendarType
This rule is implemented in Off Day/DayManager.swift.
Built-in Holiday Template Coverage
Template files are located at Off Day/PublicPlan/JSON/.
| Region | Coverage |
|---|---|
| China Mainland / Xinjiang / Tibet / Guangxi / Ningxia | 2024-01-01 to 2027-12-31 |
| Liangshan, Sichuan | 2026-01-01 to 2027-12-31 |
| Hong Kong | 2024-01-01 to 2027-12-31 |
| Macau (Public / Force / Civil Servant) | 2024-01-01 to 2027-12-31 |
| Singapore | 2024-01-01 to 2027-12-31 |
| Thailand (Financial Institutions) | 2024-01-01 to 2027-12-31 |
| Korea | 2024-01-01 to 2027-12-31 |
| United States (Federal) | 2024-01-01 to 2027-12-31 |
| Japan | 1955-01-01 to 2027-12-31 |
The 2027 China Mainland schedule follows the State Council notice published by Xinhua. For 2027, the Xinjiang, Tibet, Guangxi, Ningxia, and Liangshan templates temporarily use the mainland schedule pending local holiday updates. Historical local schedules are preserved.
Other 2027 schedules follow the official publications from Hong Kong, Macau, Singapore's Ministry of Manpower, the Bank of Thailand, Korea AeroSpace Administration, the U.S. Office of Personnel Management, and Japan's Cabinet Office. The Macau Civil Servant template marks full-day holidays only. The U.S. template includes the observance of New Year's Day 2028 on December 31, 2027.
Templates record the dates explicitly designated as holidays, substitute holidays, or make-up workdays. Adjacent ordinary weekends are handled by the base calendar. Local holidays in the Tibet template follow Lhasa notices; other cities and counties may differ. Thailand follows the nationwide financial institution calendar and excludes regional holidays such as Bangkok-only closures. The U.S. template covers Federal employees, including officially announced government-wide days off; private employers may follow different schedules.
Historical corrections verified on November 5, 2026:
- Singapore: removed the erroneous June 1, 2024 entry; added Polling Day on May 3, 2025 and the Vesak Day observance on June 1, 2026.
- Korea: added October 1, 2024, January 27, 2025, June 3, 2025, and Labor Day on May 1, 2026.
- Thailand: followed the BOT calendar to remove cancelled January 2, 2024 and ordinary weekend dates April 13–14, 2024; added the special holiday on April 12, 2024.
- Xinjiang: added March 29–30, 2025 to complete the Eid al-Fitr period in the regional notice.
- Lhasa: added August 25, 2025, February 24–26, 2026, and August 14, 2026.
- United States: added government-wide closures on December 24, 2024, January 9, 2025, and December 24 and 26, 2025.
Quick Start (User)
- Select a public holiday template.
- Configure your base calendar mode.
- Add Off Day intents in Shortcuts.
- Build personal automations (alarm, focus mode, reminders).
- Optionally add manual day marks and comments for exceptions.
Development
The Lock Screen widget uses the Widgets extension and the WidgetShared models. Enable the group.com.zizicici.zzz App Group in the signing profiles for both the app and the extension. For a different developer account, replace the group in both entitlements files and WidgetCalendarStore.appGroup with a group registered to your account.
Open the app once to sync the calendar, then long-press the Lock Screen, choose Customize → Lock Screen → Add Widgets, and select Off Day's Today & Tomorrow widget or the compact Today and Tomorrow circular widgets. The rectangular widget shows each holiday's name, falling back to the weekday when no holiday name is available. All three follow the app's day classification rules and advance at local midnight. Calendar edits request a timeline reload; WidgetKit controls when that reload occurs.
Requirements
- macOS with Xcode 14 or newer
- iOS/iPadOS 16.0+
- Swift Package Manager (resolved automatically by Xcode)
Run
git clone https://github.com/zizicici/Off-Day.git
cd Off-Day
open "Off Day.xcodeproj"
Select the Off Day scheme and run on simulator or device.
Dependencies
- GRDB.swift
7.9.0 - SnapKit
5.7.1 - Toast-Swift
5.1.1 - MarqueeLabel
4.5.3 - ZipArchive
2.6.0 - ZCCalendar
0.2.0 - MoreKit
2.2.1
Project Structure
Off Day/
├── Block/ # Main calendar UI and day interaction
├── PublicPlan/ # Built-in and custom holiday plans
├── BaseCalendar/ # Base calendar strategies
├── Intent/ # App Intents for Shortcuts
├── Notification/ # Local notification scheduling
├── Backup/ # iCloud backup and DB import/export
├── Database/ # GRDB models, migrations, persistence
├── ChineseCalendar/ # Lunar/Kyureki data support
└── More/ # Settings, about, tutorials, support
JSON Format for Custom Holiday Plan
Imported/exported plans follow this shape:
{
"name": "My Plan",
"start": "2027-01-01",
"end": "2027-12-31",
"days": [
{
"name": "New Year",
"date": "2027-01-01",
"type": 0,
"localizedNames": {
"en": "New Year",
"zh-Hans": "元旦",
"zh-Hant": "元旦"
}
}
]
}
name is the required original name. Optional localizedNames maps language codes (such as pt, th, ta, or zh-Hant) to translations, independently of the app’s interface languages. type is 0 for a day off or 1 for a workday. Dates must be valid, with years from 1 to 9999; legacy dates without zero padding remain supported. Existing templates without localizedNames remain compatible; missing or blank translations fall back to name. The earlier names key is accepted when reading; exports use localizedNames. If both keys are present, localizedNames takes precedence.
For templates with translations, choose Holiday Name Language from the calendar home screen’s top-right (…) menu. Original Names is the default. Changes take effect immediately and are remembered separately for each template. Imports, exports, copies, and subscription updates preserve translations. When editing a custom holiday, selecting a language updates that translation while preserving the original and other translations; Original Names edits name. Newly created holidays also receive an original name for fallback. Language selection affects display text; reminder grouping continues to use original names. Bundled 2027 entries include local official languages and simplified/traditional Chinese: English for Hong Kong and the US, Portuguese for Macao, English/Malay/Tamil for Singapore, and Japanese/Korean/Thai for their respective regions. Mainland and local Chinese templates initially include simplified/traditional Chinese; minority languages will follow later. Earlier entries retain their original names. Portuguese names follow the Macao government calendar; Thai names follow the Bank of Thailand notice. Singapore terminology follows MOM’s Malay guide and Tamil guide.
Reference model: Off Day/PublicPlan/Model/JSONPublicPlan.swift.
Roadmap
- Built-in multi-region holiday templates
- Custom template import/export
- Base calendar modes (standard/week-cycle/day-cycle)
- App Intents + automation workflow
- Backup and restore
- Interactive widget
- Subscribable remote holiday templates with update review
Contributing
Issues and pull requests are welcome.
If you contribute holiday data:
- Keep
start/endaligned with actual dataset coverage. - Ensure all
days[].datevalues stay within the range. - Keep JSON sorted and readable.
Screenshots
License
Off Day is available under the MIT License.
関連プロジェクトを探す
読み込み中…