{
  "_id": "6a169cfcacfb0bcc41d7eb58",
  "Package": "phinterval",
  "Title": "Set Operations on Time Intervals",
  "Version": "1.0.0.9000",
  "Authors@R": "person(\n\"Ethan\", \"Sansom\",\nemail = \"ethan.sansom29@gmail.com\",\nrole = c(\"aut\", \"cre\", \"cph\"),\ncomment = c(ORCID = \"0009-0000-1573-0186\")\n)",
  "Description": "Implements the phinterval vector class for representing\ntime spans that may contain gaps (disjoint intervals) or be\nempty. This class generalizes the 'lubridate' package's\ninterval class to support vectorized set operations\n(intersection, union, difference, complement) that always\nreturn a valid time span, even when disjoint or empty intervals\nare created.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "URL": "https://github.com/EthanSansom/phinterval,\nhttps://ethansansom.github.io/phinterval/",
  "BugReports": "https://github.com/EthanSansom/phinterval/issues",
  "Config/testthat/edition": "3",
  "VignetteBuilder": "knitr",
  "SystemRequirements": "C++17",
  "Config/Needs/website": "rmarkdown",
  "Repository": "https://ethansansom.r-universe.dev",
  "Date/Publication": "2026-03-28 10:10:19 UTC",
  "RemoteUrl": "https://github.com/ethansansom/phinterval",
  "RemoteRef": "HEAD",
  "RemoteSha": "fe67ef44c25824e53c333c833223d50863870669",
  "NeedsCompilation": "yes",
  "Packaged": {
    "Date": "2026-05-27 07:16:06 UTC",
    "User": "root"
  },
  "Author": "Ethan Sansom [aut, cre, cph] (ORCID:\n<https://orcid.org/0009-0000-1573-0186>)",
  "Maintainer": "Ethan Sansom <ethan.sansom29@gmail.com>",
  "MD5sum": "d06c41b5b1fb78fdf7deb6bf5105a745",
  "_user": "ethansansom",
  "_type": "src",
  "_file": "phinterval_1.0.0.9000.tar.gz",
  "_fileid": "1030af9eacd1048cd24acb6591a7a2d69dad3d8f6310aa3619212f3faef51a3e",
  "_filesize": 419617,
  "_sha256": "1030af9eacd1048cd24acb6591a7a2d69dad3d8f6310aa3619212f3faef51a3e",
  "_created": "2026-05-27T07:16:06.000Z",
  "_published": "2026-05-27T07:27:56.559Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 78026758336,
      "time": 191,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "ERROR",
      "artifact": "7234243072"
    },
    {
      "job": 78026758317,
      "time": 170,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "ERROR",
      "artifact": "7234237002"
    },
    {
      "job": 78026758331,
      "time": 152,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "ERROR",
      "artifact": "7234231667"
    },
    {
      "job": 78026758292,
      "time": 161,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "ERROR",
      "artifact": "7234234136"
    },
    {
      "job": 78026758283,
      "time": 142,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "ERROR",
      "artifact": "7234354915"
    },
    {
      "job": 78026758329,
      "time": 343,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "ERROR",
      "artifact": "7234379963"
    },
    {
      "job": 78026758254,
      "time": 172,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "ERROR",
      "artifact": "7234361612"
    },
    {
      "job": 78026758446,
      "time": 294,
      "config": "macos-release-x86_64",
      "r": "4.6.0",
      "check": "ERROR",
      "artifact": "7234277331"
    },
    {
      "job": 78026226496,
      "time": 221,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7234183876"
    },
    {
      "job": 78026758268,
      "time": 130,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7234225349"
    },
    {
      "job": 78026758221,
      "time": 155,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "ERROR",
      "artifact": "7234232557"
    },
    {
      "job": 78026758233,
      "time": 147,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "ERROR",
      "artifact": "7234230635"
    },
    {
      "job": 78026758240,
      "time": 159,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "ERROR",
      "artifact": "7234233360"
    }
  ],
  "_buildurl": "https://github.com/r-universe/ethansansom/actions/runs/26496588877",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/ethansansom/phinterval",
  "_commit": {
    "id": "fe67ef44c25824e53c333c833223d50863870669",
    "author": "Ethan Sansom <99099398+EthanSansom@users.noreply.github.com>",
    "committer": "Ethan Sansom <99099398+EthanSansom@users.noreply.github.com>",
    "message": "Add `phint_unoverlap()`, `phint_has_overlaps()`, `phint_any_overlaps()` to NEWS (#15)\n",
    "time": 1774692619
  },
  "_maintainer": {
    "name": "Ethan Sansom",
    "email": "ethan.sansom29@gmail.com",
    "login": "ethansansom",
    "description": "MSc Statistics student at the University of Toronto, Data Analyst at OpenResearch and the Clean Air Partnership. I start many R packages and finish some.",
    "uuid": 99099398
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.0.0",
      "role": "Depends"
    },
    {
      "package": "Rcpp",
      "role": "LinkingTo"
    },
    {
      "package": "tzdb",
      "role": "LinkingTo"
    },
    {
      "package": "lubridate",
      "role": "Imports"
    },
    {
      "package": "methods",
      "role": "Imports"
    },
    {
      "package": "pillar",
      "role": "Imports"
    },
    {
      "package": "Rcpp",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "role": "Imports"
    },
    {
      "package": "tzdb",
      "role": "Imports"
    },
    {
      "package": "vctrs",
      "version": ">= 0.7.0",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "tidyr",
      "role": "Suggests"
    },
    {
      "package": "withr",
      "role": "Suggests"
    }
  ],
  "_owner": "ethansansom",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-44",
      "n": 33
    },
    {
      "week": "2025-46",
      "n": 46
    },
    {
      "week": "2025-51",
      "n": 17
    },
    {
      "week": "2025-52",
      "n": 20
    },
    {
      "week": "2026-05",
      "n": 15
    },
    {
      "week": "2026-06",
      "n": 5
    },
    {
      "week": "2026-10",
      "n": 23
    },
    {
      "week": "2026-11",
      "n": 19
    },
    {
      "week": "2026-12",
      "n": 12
    },
    {
      "week": "2026-13",
      "n": 2
    }
  ],
  "_tags": [
    {
      "name": "v1.0.0",
      "date": "2026-01-29"
    }
  ],
  "_topics": [
    "datetime",
    "interval-algebra",
    "cpp"
  ],
  "_stars": 1,
  "_contributors": [
    {
      "user": "ethansansom",
      "count": 307,
      "uuid": 99099398
    }
  ],
  "_userbio": {
    "uuid": 99099398,
    "type": "user",
    "name": "Ethan Sansom",
    "description": "MSc Statistics student at the University of Toronto, Data Analyst at OpenResearch and the Clean Air Partnership. I start many R packages and finish some."
  },
  "_downloads": {
    "count": 125,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/phinterval"
  },
  "_devurl": "https://github.com/ethansansom/phinterval",
  "_pkgdown": "https://ethansansom.github.io/phinterval/",
  "_searchresults": 4,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/phinterval.html",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/ethansansom/phinterval",
  "_realowner": "ethansansom",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.0",
      "date": "2026-02-03"
    }
  ],
  "_exports": [
    "as_duration",
    "as_phinterval",
    "datetime_flatten",
    "datetime_squash",
    "datetime_squash_by",
    "duration",
    "hole",
    "interval",
    "is_disjoint",
    "is_hole",
    "is_phinterval",
    "is_phintish",
    "is_recognized_tzone",
    "is_span",
    "n_spans",
    "NA_POSIXct_",
    "phint_any_overlaps",
    "phint_complement",
    "phint_cumintersect",
    "phint_cumunion",
    "phint_discard_instants",
    "phint_end",
    "phint_ends",
    "phint_flatten",
    "phint_has_overlaps",
    "phint_intersect",
    "phint_invert",
    "phint_length",
    "phint_lengths",
    "phint_overlaps",
    "phint_setdiff",
    "phint_sift",
    "phint_squash",
    "phint_squash_by",
    "phint_start",
    "phint_starts",
    "phint_symmetric_setdiff",
    "phint_union",
    "phint_unnest",
    "phint_unoverlap",
    "phint_within",
    "phinterval",
    "POSIXct",
    "tzdb_names",
    "tzdb_version"
  ],
  "_help": [
    {
      "page": "as_duration",
      "title": "Convert a phinterval to a duration",
      "topics": [
        "as_duration",
        "as_duration.default",
        "as_duration.phinterval"
      ]
    },
    {
      "page": "as_phinterval",
      "title": "Convert an interval or datetime vector into a phinterval",
      "topics": [
        "as_phinterval",
        "as_phinterval.default",
        "as_phinterval.Interval"
      ]
    },
    {
      "page": "flatten",
      "title": "Flatten a phinterval vector into a vector of spans or gaps",
      "topics": [
        "datetime_flatten",
        "flatten",
        "phint_flatten"
      ]
    },
    {
      "page": "hole",
      "title": "Create a hole phinterval",
      "topics": [
        "hole"
      ]
    },
    {
      "page": "is_phinterval",
      "title": "Test if the object is a phinterval",
      "topics": [
        "is_phinterval"
      ]
    },
    {
      "page": "is_phintish",
      "title": "Test if the object is a phinterval or interval",
      "topics": [
        "is_phintish"
      ]
    },
    {
      "page": "is_recognized_tzone",
      "title": "Test if the object is a recognized time zone",
      "topics": [
        "is_recognized_tzone"
      ]
    },
    {
      "page": "n_spans",
      "title": "Count the number of spans in a phinterval",
      "topics": [
        "n_spans",
        "n_spans.default",
        "n_spans.Interval",
        "n_spans.phinterval"
      ]
    },
    {
      "page": "phint_discard_instants",
      "title": "Remove instantaneous time spans from a phinterval",
      "topics": [
        "phint_discard_instants"
      ]
    },
    {
      "page": "phint_invert",
      "title": "Get the gaps in a phinterval as time spans",
      "topics": [
        "phint_invert"
      ]
    },
    {
      "page": "phint_length",
      "title": "Compute the length of a phinterval in seconds",
      "topics": [
        "phint_length",
        "phint_length.default",
        "phint_length.Interval",
        "phint_length.phinterval",
        "phint_lengths",
        "phint_lengths.default",
        "phint_lengths.Interval",
        "phint_lengths.phinterval"
      ]
    },
    {
      "page": "phint_overlaps",
      "title": "Test whether two phintervals overlap",
      "topics": [
        "phint_overlaps"
      ]
    },
    {
      "page": "phint_sift",
      "title": "Keep or discard spans by duration",
      "topics": [
        "phint_sift"
      ]
    },
    {
      "page": "phint_unnest",
      "title": "Unnest a phinterval into a data frame",
      "topics": [
        "phint_unnest"
      ]
    },
    {
      "page": "phint_unoverlap",
      "title": "Resolve overlapping intervals sequentially or by priority",
      "topics": [
        "phint_unoverlap"
      ]
    },
    {
      "page": "phint_within",
      "title": "Test whether a datetime or phinterval is within another phinterval",
      "topics": [
        "phint_within"
      ]
    },
    {
      "page": "phinterval",
      "title": "Create a new phinterval",
      "topics": [
        "phinterval"
      ]
    },
    {
      "page": "phinterval_options",
      "title": "Package options",
      "topics": [
        "phinterval_options"
      ]
    },
    {
      "page": "phinterval-accessors",
      "title": "Accessors for the endpoints of a phinterval",
      "topics": [
        "phinterval-accessors",
        "phint_end",
        "phint_end.default",
        "phint_end.Interval",
        "phint_end.phinterval",
        "phint_ends",
        "phint_ends.default",
        "phint_ends.Interval",
        "phint_ends.phinterval",
        "phint_start",
        "phint_start.default",
        "phint_start.Interval",
        "phint_start.phinterval",
        "phint_starts",
        "phint_starts.default",
        "phint_starts.Interval",
        "phint_starts.phinterval"
      ]
    },
    {
      "page": "phinterval-cumset-operations",
      "title": "Cumulative set operations",
      "topics": [
        "phinterval-cumset-operations",
        "phint_cumintersect",
        "phint_cumunion"
      ]
    },
    {
      "page": "phinterval-overlap-predicates",
      "title": "Test whether a phinterval vector has cross-element overlaps",
      "topics": [
        "phinterval-overlap-predicates",
        "phint_any_overlaps",
        "phint_has_overlaps"
      ]
    },
    {
      "page": "phinterval-set-operations",
      "title": "Vectorized set operations",
      "topics": [
        "phinterval-set-operations",
        "phint_complement",
        "phint_intersect",
        "phint_setdiff",
        "phint_symmetric_setdiff",
        "phint_union"
      ]
    },
    {
      "page": "phinterval-span-predicates",
      "title": "Test for empty, contiguous, or disjoint intervals",
      "topics": [
        "is_disjoint",
        "is_hole",
        "is_span",
        "phinterval-span-predicates"
      ]
    },
    {
      "page": "squash",
      "title": "Squash overlapping intervals into non-overlapping spans",
      "topics": [
        "datetime_squash",
        "datetime_squash_by",
        "phint_squash",
        "phint_squash_by",
        "squash"
      ]
    }
  ],
  "_pkglogo": "https://github.com/ethansansom/phinterval/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/ethansansom/phinterval/raw/HEAD/README.md",
  "_rundeps": [
    "cli",
    "cpp11",
    "generics",
    "glue",
    "lifecycle",
    "lubridate",
    "magrittr",
    "pillar",
    "pkgconfig",
    "Rcpp",
    "rlang",
    "tibble",
    "timechange",
    "tzdb",
    "utf8",
    "vctrs"
  ],
  "_sysdeps": [
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "14.2.0-4ubuntu2~24.04.1",
      "name": "c++",
      "homepage": "http://gcc.gnu.org/",
      "description": "GNU Standard C++ Library v3"
    }
  ],
  "_vignettes": [
    {
      "source": "phinterval.Rmd",
      "filename": "phinterval.html",
      "title": "Introduction to phinterval",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "When Time Isn't Continuous",
        "Empty Intersections",
        "Punching Holes in Intervals",
        "Unions of Non-Overlapping Spans",
        "Subtracting an Interval from Itself",
        "Case Study: Employment History",
        "Merging Intervals",
        "Finding Gaps",
        "Edge Cases and Gotchas",
        "Abutting Intervals and Intersection",
        "Instantaneous Intervals and Set Difference",
        "Time Zones",
        "Comparison with Datetime Vectors"
      ],
      "created": "2025-12-19 04:34:24",
      "modified": "2026-03-15 21:40:17",
      "commits": 9
    }
  ],
  "_score": 4.698970004336019,
  "_indexed": true,
  "_nocasepkg": "phinterval",
  "_universes": [
    "ethansansom"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.0.0.9000",
      "date": "2026-05-27T07:19:14.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "fe67ef44c25824e53c333c833223d50863870669",
      "fileid": "05352c09541c537d78bfa1b33bda4dd33e8e7ffd9ef297b622a4f467243d1647",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/ethansansom/actions/runs/26496588877"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.0.0.9000",
      "date": "2026-05-27T07:18:48.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "fe67ef44c25824e53c333c833223d50863870669",
      "fileid": "4b7a992ca57948c57f6cb42abae5517fb7ae0db5d43d138680c3d6b304ea3dbd",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/ethansansom/actions/runs/26496588877"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.0.0.9000",
      "date": "2026-05-27T07:18:35.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "fe67ef44c25824e53c333c833223d50863870669",
      "fileid": "7dd7328a3e8423894e1668d0bdb7e938a55ae51f1513649d4974e1f7b14699c2",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/ethansansom/actions/runs/26496588877"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.0.0.9000",
      "date": "2026-05-27T07:18:40.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "fe67ef44c25824e53c333c833223d50863870669",
      "fileid": "a46f864ad524255f2b61ea616823696d5acc664063cc910d5d30107ed9423361",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/ethansansom/actions/runs/26496588877"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.0.0.9000",
      "date": "2026-05-27T07:25:32.000Z",
      "arch": "aarch64",
      "commit": "fe67ef44c25824e53c333c833223d50863870669",
      "fileid": "3bbdba8a9eedf3ce8905ea3d8a1ebf189eb8a811180d832de7d16615b88eff95",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/ethansansom/actions/runs/26496588877"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.0.0.9000",
      "date": "2026-05-27T07:26:08.000Z",
      "arch": "x86_64",
      "commit": "fe67ef44c25824e53c333c833223d50863870669",
      "fileid": "c4ae3eb3e7e4e065ef6eb5a2e7044ef36536342198063d15e9dfa685d61d1533",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/ethansansom/actions/runs/26496588877"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.0.0.9000",
      "date": "2026-05-27T07:25:40.000Z",
      "arch": "aarch64",
      "commit": "fe67ef44c25824e53c333c833223d50863870669",
      "fileid": "c171176cb8c95c13351e32f1e919d02dd9d7f90765c5f2b29d01cbfd75f0ba81",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/ethansansom/actions/runs/26496588877"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.0.0.9000",
      "date": "2026-05-27T07:20:04.000Z",
      "arch": "x86_64",
      "commit": "fe67ef44c25824e53c333c833223d50863870669",
      "fileid": "f5ca027dbf322ab5090c4149c0d7b0c30f738722144e81433b35335a1e71b6f9",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/ethansansom/actions/runs/26496588877"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.0.0.9000",
      "date": "2026-05-27T07:18:39.000Z",
      "arch": "emscripten",
      "commit": "fe67ef44c25824e53c333c833223d50863870669",
      "fileid": "22bd1d87f3464e7539c7bc69f4e5a5e612576c8e563e3ea09fa18a418f5bff22",
      "status": "success",
      "buildurl": "https://github.com/r-universe/ethansansom/actions/runs/26496588877"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.0.0.9000",
      "date": "2026-05-27T07:17:54.000Z",
      "arch": "x86_64",
      "commit": "fe67ef44c25824e53c333c833223d50863870669",
      "fileid": "bd46dcff194356ce80d9af637d80e1f643bda6e84da18bb1966c9e142eec3cf2",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/ethansansom/actions/runs/26496588877"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.0.0.9000",
      "date": "2026-05-27T07:17:49.000Z",
      "arch": "x86_64",
      "commit": "fe67ef44c25824e53c333c833223d50863870669",
      "fileid": "46fe9186da581b8a7b8fe86303f1ccb56c45bd9e0624ae9d221670aac2f294c0",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/ethansansom/actions/runs/26496588877"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.0.0.9000",
      "date": "2026-05-27T07:17:43.000Z",
      "arch": "x86_64",
      "commit": "fe67ef44c25824e53c333c833223d50863870669",
      "fileid": "3e643910d4ba8fb501dfe5bdfb765468a05906a56cada4d65dbd0226170b0b83",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/ethansansom/actions/runs/26496588877"
    }
  ]
}