ICS Parser
A PHP library that parses iCalendar (.ics/.ical/.ifb) files into structured event data with timezone-aware dates.
Repository Health
Technical Analysis
ICS Parser reads iCalendar files (.ics, .ical, .ifb) and turns their raw key/value structure into a PHP associative array of calendar and event data, resolving DateTime objects with IANA/Unicode CLDR/Windows timezone data applied. It’s a long-running, community-maintained fork (originally by John Grogg, now maintained under the u01jmg3 GitHub account, while keeping the johngrogg/ics-parser Packagist name for backward compatibility) used across scheduling and calendar-integration tools.
What You Get
- An
ICalclass that parses.ics/.ical/.ifbfiles (or raw strings) into calendar and event associative arrays - Automatic timezone resolution using IANA, Unicode CLDR, or Windows timezone data, exposed via
dtstart_tz/dtend_tz - PHP
DateTimeobject generation for date/time properties wherever the format allows it {property}_arraycompanion fields that further resolve structured properties beyond the raw string value- Support for recurring events via relative date format parsing (with documented limits on complex
BYDAY+BYSETPOSrules)
Common Use Cases
- Importing external calendar feeds (Google Calendar exports, Outlook .ics attachments) into a PHP application’s own event model
- Building calendar-sync integrations that need to read third-party .ics feeds and normalize them to local timezones
- Displaying upcoming events from a subscribed iCalendar feed on a website or dashboard
- Validating and inspecting .ics files programmatically as part of a scheduling or booking tool’s ingestion pipeline
Under The Hood
Architecture: The library is deliberately small — two classes, ICal (the parser/entry point) and Event (a typed wrapper around a single VEVENT) — with ICal handling file/string ingestion, line-unfolding, key/value tokenizing per the iCalendar grammar, and timezone/date post-processing in one pass. Tech Stack: Pure PHP with no runtime dependencies, supporting PHP back to 5.6.40 for legacy compatibility while its dev tooling (phpstan, rector, ecs) targets modern PHP standards, reflecting a codebase that serves both old and current PHP deployments. Code Quality: The repo runs PHPStan static analysis, Rector for automated upgrades, and Easy Coding Standard (ecs) for style enforcement, alongside a PHPUnit test suite (composer test) and example scripts under examples/ that double as informal integration tests. API Design: The public surface is intentionally simple — instantiate ICal with a file path or string, then call ->events() or read ->cal — but the README is explicit about edge cases (relative date format limits, the Packagist-name-vs-GitHub-owner mismatch), which is unusually good practice honesty for a small utility library.
Used by 2 apps in this directory
EspoCRM
Marketing · Ecommerce · CRM
Open-source CRM platform with metadata-driven customization, field-level permissions, and a full REST API — deploy on your own infrastructure.
Leantime
Productivity · Project Management · Collaboration
Project management built for ADHD, autism, and dyslexia — simple as Trello, powerful as Jira