Search by

jaizendra-netizen / meeting-weekday-mix

onegtmlab

PHP CLI and library: count the meetings in a CSV per weekday, from the calendar date of each, and show the share, a text bar and the mix per meeting type.

Package info

github.com/jaizendra-netizen/meeting-weekday-mix

Homepage

Type:project

pkg:composer/jaizendra-netizen/meeting-weekday-mix

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-11-29 06:11 UTC

This package is not auto-updated.

Last update: 2026-11-30 04:30:06 UTC


README

PHP command line tool and library. Give it a CSV with one row per meeting: an id, the calendar date it was held and a type label you chose (for example Intro or Demo). It works out the weekday of each date and shows, for Monday to Sunday, how many meetings fell on that day, the share of all meetings (1 decimal) and a text bar of # characters scaled to the busiest day (the busiest day gets 20, every other day the nearest whole number of 20, and a day with at least one meeting always gets at least one #). It names the busiest and the quietest weekday among Monday to Friday (a tie goes to the earlier day of the week), counts the weekend meetings, and shows for each type its meetings and the count per weekday in one line (types sorted by meetings, highest first, then by name). It does not know time zones, holidays or working hours, reads no calendar and says nothing about which day is better for booking: it only counts the dates you give. The weekday comes from the calendar date alone (treated as UTC), so the clock is never read and the same file always prints the same report. Types are matched without regard to case and the first spelling seen is shown.

Part of the OneGTMLab free GTM tools. Background on the idea: book a call.

Install

composer require jaizendra-netizen/meeting-weekday-mix

Use

Input is a CSV with the columns meeting_id, held_on (a real calendar date, yyyy-mm-dd) and type. Column names are matched without regard to case and may be in any order. Option --weekdays-only drops every Saturday and Sunday row from all the figures and says how many were dropped; the weekend line is then left out, and shares are counted over the meetings that remain. A duplicate meeting_id, a bad or impossible date such as 2026-02-30, an empty type, a missing column, a row with the wrong number of cells, a file with no rows (or no rows left after --weekdays-only) exits 1 with a message that names the row where there is one. An unreadable file, an unknown option or a missing argument exits 2.

$ php bin/meeting-weekday-mix sample.csv
meetings: 14
per weekday:
  Monday      3  21.4%  ###############
  Tuesday     4  28.6%  ####################
  Wednesday   1   7.1%  #####
  Thursday    3  21.4%  ###############
  Friday      1   7.1%  #####
  Saturday    1   7.1%  #####
  Sunday      1   7.1%  #####
busiest weekday (Monday to Friday): Tuesday (4)
quietest weekday (Monday to Friday): Wednesday (1)
weekend meetings: 2 (14.3%)
per type:
  Intro: 6 meetings, Mon 1 Tue 3 Wed 0 Thu 1 Fri 1 Sat 0 Sun 0
  Demo: 5 meetings, Mon 2 Tue 1 Wed 0 Thu 1 Fri 0 Sat 0 Sun 1
  Review: 3 meetings, Mon 0 Tue 0 Wed 1 Thu 1 Fri 0 Sat 1 Sun 0

Test

php tests/run.php

Offline, no network calls, no dependencies beyond the language runtime. MIT licensed.