srishanbhattarai / nepcal

Cross-platform utilities for Nepali dates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move calendar generation logic into nepcal package

srishanbhattarai opened this issue · comments

Currently, the CLI does the manual work of creating the calendar, but it can be done by the nepcal package for any date. An interface like the following could be exposed:

type Calendar struct {
  // Use a sentinel to denote empty days
  weeks [][7]int

  // could contain some information derived from the time. 
  // expose via methods
 StartWeekday Weekday
 NumDaysInMonth int
}

func (t Time) Calendar() Calendar {}

Closed by #70