← Back to all sparks
E

ethiodate

INFRA · APIS
Velocity0.0

Working with Ethiopian Dates

The Ethiopian calendar becomes a first-class R date class, ggplot2 axes included.

calendarsethiopiadate-handlingggplot2s3-methods
Current state
ethiodate implements the Ethiopian calendar as an R date class. Over three releases it has gone from conversion helpers to something that behaves like a date type: ggplot2 scales and breaks, quarter extraction, and seq() and cut() methods defined for the ethdate class. The most recent release is a robustness fix for summary.ethdate() under R 4.6.0 and later.
Where it's heading
The work follows the standard path for a custom date class in R: get the arithmetic right, then implement the generics the rest of the ecosystem calls, then handle vector recycling and precision. Switching internal storage from integer to double in 0.3.0 is a quiet but load-bearing change, and accepting numeric months widens the input surface. Each release closes another gap between ethdate and Date.
Prediction
Expect the remaining base generics and formatting paths to be filled in, and continued fixes tracking R's own changes. The package is close enough to full coverage that the next releases will mostly be about edge cases.

Recent moves

  1. 7mo ago

    Robustness fix for summary.ethdate() under R 4.6

    A compatibility patch keeping summary.ethdate() and its tests working with R 4.6.0 and later. Upstream-tracking work with no change to the calendar logic.

    View source ↗
  2. 8mo ago

    Numeric months accepted; internal storage moves to double

    Three changes that make the class harder to misuse: eth_monthname() takes numeric months, vector lengths recycle so mixed formats and origins work together, and internal storage moves from integer to double for precision. The last is the kind of change that only shows up when arithmetic stops silently truncating.

    View source ↗
  3. 1y ago

    ggplot2 scales and base generics make ethdate plottable

    The release that connects the class to the rest of the ecosystem: scale_x_ethdate() and scale_y_ethdate() with eth_breaks() and eth_labels() behind them, eth_quarter() for period extraction, and seq() and cut() defined for ethdate. Ethiopian dates stop needing conversion to Date before they can be charted or binned.

    View source ↗