Versions in this module Expand all Collapse all v0 v0.7.0 Sep 23, 2026 Changes in this version + var ErrInvalidWeekday = errors.New("bs: invalid weekday") + func WeekdayNameNepali(weekday time.Weekday) (string, error) type Date + func (d Date) FormatNepali(layout string) (string, error) + func (d Date) WeekdayNameNepali() (string, error) v0.6.1 Sep 22, 2026 v0.6.0 Sep 22, 2026 Changes in this version type Date + func (d *Date) Scan(value any) error + func (d *Date) UnmarshalText(data []byte) error + func (d Date) MarshalText() ([]byte, error) + func (d Date) Value() (driver.Value, error) v0.5.0 Sep 22, 2026 Changes in this version + var ErrInvalidDateOrder = errors.New("bs: invalid date order") + func Age(birthBS, todayBS Date) (years, months, days int, err error) type Date + func MustParse(s string) Date + func TodayBS() (Date, error) + func (d Date) NextDay() (Date, error) + func (d Date) NextMonth() (Date, error) + func (d Date) PreviousDay() (Date, error) + func (d Date) PreviousMonth() (Date, error) v0.4.0 Sep 22, 2026 Changes in this version + func FirstWeekdayOfMonth(year, month int) (time.Weekday, error) + func MonthCalendar(year, month int) ([][]*Date, error) + func WeeksInMonth(year, month int) (int, error) v0.3.0 Sep 22, 2026 Changes in this version + func FromNepaliDigits(s string) string + func MonthNameNepali(month int) (string, error) + func ToNepaliDigits(s string) string type Date + func (d Date) Format(layout string) (string, error) + func (d Date) MonthNameNepali() (string, error) v0.2.0 Sep 22, 2026 Changes in this version + func Compare(a, b Date) int + func DaysBetween(a, b Date) (int, error) type Date + func (d Date) DayOfYear() (int, error) + func (d Date) EndOfMonth() (Date, error) + func (d Date) EndOfYear() (Date, error) + func (d Date) StartOfMonth() (Date, error) + func (d Date) StartOfYear() (Date, error) + func (d Date) SubDays(n int) (Date, error) v0.1.0 Sep 22, 2026 Changes in this version + const MaxBSYear + const MinBSYear + var ErrInvalidDay = errors.New("bs: invalid day") + var ErrInvalidFormat = errors.New("bs: invalid date format") + var ErrInvalidMonth = errors.New("bs: invalid month") + var ErrInvalidYear = errors.New("bs: invalid year") + var ErrOutOfRange = errors.New("bs: date outside supported range") + func BSToAD(d Date) (time.Time, error) + func DaysInMonth(year, month int) (int, error) + func DaysInYear(year int) (int, error) + func IsSupportedBSYear(year int) bool + func IsValid(year, month, day int) bool + func MonthName(month int) (string, error) + type Date struct + Day int + Month int + Year int + func ADToBS(t time.Time) (Date, error) + func NewDate(year, month, day int) (Date, error) + func Parse(s string) (Date, error) + func (d Date) AddDays(n int) (Date, error) + func (d Date) After(other Date) bool + func (d Date) Before(other Date) bool + func (d Date) DayOfWeek() (time.Weekday, error) + func (d Date) Equal(other Date) bool + func (d Date) MonthName() (string, error) + func (d Date) String() string + func (d Date) Valid() bool