natashamoorfield / npm_calmarendian_date

GNU General Public License v3.0
0 stars 0 forks source link

Day-in-Season Notation (DSN) #14

Open natashamoorfield opened 2 years ago

natashamoorfield commented 2 years ago

A notation which merges the day-in-week and week-in-season values into a single day-in-season value so that, for example, Tuesday, Week 2 of Onset 777 becomes 9 Onset 777. This is to mirror the notation used in the WA Chronology feature rather than this being an alternative notation used by Calmarendians themselves.

We shall need to add an appropriate (pseudo-)constructor:

CalmarendianDate.from_day_in_season(
    cycle: int,
    season: int,
    day_in_season: int,
    era_marker: Union[str, EraMarker] = EraMarker.CE
)

and its inverse:

CalmarendianDate.day_in_season() -> DayInSeason
natashamoorfield commented 2 years ago

Whilst not an exact like-for-like, these should be treated as the CalmarendianDate equivalent of the Gregorian date.isocalendar and date.fromisocalendar methods.

natashamoorfield commented 2 years ago

See code in ideas_2022-07-09_issue-14.py for implementation ideas.