{"id":32209475,"url":"https://github.com/atfutures/calendar","last_synced_at":"2025-10-22T06:07:11.144Z","repository":{"id":48639118,"uuid":"143872302","full_name":"ATFutures/calendar","owner":"ATFutures","description":"R interface to iCal (.ics files)","archived":false,"fork":false,"pushed_at":"2024-08-20T06:43:43.000Z","size":552,"stargazers_count":41,"open_issues_count":15,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-26T14:12:18.082Z","etag":null,"topics":["calendar","ical","r-package"],"latest_commit_sha":null,"homepage":"https://atfutures.github.io/calendar/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ATFutures.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-07T12:47:25.000Z","updated_at":"2025-03-22T10:58:47.000Z","dependencies_parsed_at":"2024-08-10T08:01:01.829Z","dependency_job_id":"c09625ba-9352-4ba2-bc25-790e07d332cd","html_url":"https://github.com/ATFutures/calendar","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ATFutures/calendar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ATFutures%2Fcalendar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ATFutures%2Fcalendar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ATFutures%2Fcalendar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ATFutures%2Fcalendar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ATFutures","download_url":"https://codeload.github.com/ATFutures/calendar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ATFutures%2Fcalendar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280389485,"owners_count":26322542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calendar","ical","r-package"],"created_at":"2025-10-22T06:07:10.196Z","updated_at":"2025-10-22T06:07:11.137Z","avatar_url":"https://github.com/ATFutures.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- badges: start --\u003e\n  [![R-CMD-check](https://github.com/ATFutures/calendar/workflows/R-CMD-check/badge.svg)](https://github.com/ATFutures/calendar/actions)\n[![](http://www.r-pkg.org/badges/version/calendar)](https://www.r-pkg.org:443/pkg/calendar)\n[![The API of a maturing package has been roughed out, but finer details likely to change.](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)\n[![Coverage status](https://codecov.io/gh/ATFutures/calendar/branch/master/graph/badge.svg)](https://app.codecov.io/github/ATFutures/calendar?branch=master)\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/calendar)](https://CRAN.R-project.org/package=calendar)\n\u003c!-- badges: end --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# calendar\n\nThe goal of calendar is to make it easy to create, read, write, and work with iCalander (`.ics`, `.ical` or similar) files, and the scheduling data they represent, in R.\niCalendar is an open standard for\n\"exchanging calendar and scheduling information between users and computers\"\ndescribed at [icalendar.org](https://icalendar.org/) (the full spec can be found in a \nplain text file [here](https://www.rfc-editor.org/rfc/rfc5545.txt)).\n\nRecently the UK Government endorsed the iCal format in a [publication](https://www.gov.uk/government/publications/open-standards-for-government/exchange-of-calendar-events) for the 'Open Standards for Government' series.\n[An example .ics file](https://www.gov.uk/bank-holidays/england-and-wales.ics) is provided by the .gov.uk domain, which shows holidays in England and Wales.\n\n## Installation\n```{r install-cran, eval=FALSE}\ninstall.packages(\"calendar\")\n```\n\nOr install the cutting edge from GitHub\n```{r, message=FALSE, results='hide'}\ndevtools::install_github(\"ATFutures/calendar\")\n```\n\n```{r}\nlibrary(calendar)\n```\n\n\u003c!-- You can install the released version of calendar from [CRAN](https://CRAN.R-project.org) with: --\u003e\n\n\u003c!-- ``` r --\u003e\n\u003c!-- install.packages(\"calendar\") --\u003e\n\u003c!-- ``` --\u003e\n\n## Example\n\nA minimal example representing the contents of an iCalendar file is provided in the dataset `ical_example`, which is loaded when the package is attached.\nThis is what iCal files look like:\n\n```{r min-example}\nical_example\n```\n\nRelevant fields can be found and extracted as follows:\n\n```{r}\nwhich(ic_find(ical_example, \"TSTAMP\"))\nic_extract(ical_example, \"TSTAMP\")\n```\n\nA larger example shows all national holidays in England and Wales.\nIt can be read-in as follows:\n\n```{r example}\nics_file \u003c- system.file(\"extdata\", \"england-and-wales.ics\", package = \"calendar\")\nics_raw = readLines(ics_file) \nhead(ics_raw) # check it's in the ICS format\n```\n\nA list representation of the calendar can be created using `ic_list()` as follows:\n\n```{r}\nics_list = ic_list(ics_raw)\nics_list[1:2]\n```\n\nA data frame representing the calendar can be created as follows (work in progress):\n\n```{r}\nics_df = ic_read(ics_file) # read it in\nhead(ics_df) # check the results\n```\n\nWhat class is each column?\n\n```{r cars}\nvapply(ics_df, class, character(1))\n```\n\n## Trying on calendars 'in the wild'\n\nTo make the package robust we test on a wide range of ical formats.\nHere's an example from my work calendar, for example:\n\n```{r}\nmy_cal = ic_dataframe(ical_outlook)\nmy_cal$SUMMARY[1]\n# calculate the duration of the European R users meeting event:\nmy_cal$`DTEND;VALUE=DATE`[1] - my_cal$`DTSTART;VALUE=DATE`[1]\n```\n\n\u003c!-- An example from the wild: --\u003e\n\n```{r, echo=FALSE, eval=FALSE}\nmy_cal = ic_read(\"https://outlook.office365.com/owa/calendar/63f6c4e85d124df6a20656ade8e71faa@leeds.ac.uk/32e1cb4137f4414b8d7644453ec4b10414316826143036893453/calendar.ics\")\n\nattributes(my_cal)$ical\n# head(my_cal[c(\"DESCRIPTION\", \"SUMMARY\", \"DTSTART\", \"DTEND\", \"STATUS\", \"SEQUENCE\", \"LOCATION\")])\n```\n\n## Related projects\n\n- A Python package for working with ics files: https://github.com/ics-py/ics-py\n- A JavaScript package by Mozilla: https://github.com/kewisch/ical.js\n- Ruby library: https://github.com/icalendar/icalendar\n- The ical R package on CRAN for reading .ics files: https://github.com/petermeissner/ical\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatfutures%2Fcalendar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatfutures%2Fcalendar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatfutures%2Fcalendar/lists"}