Repository navigation
Releases: sanamhub/nepdate-go
Releases · sanamhub/nepdate-go
Release list
v0.1.0-beta.1
First public pre-release. The API may still change before 0.1.0.
Added
Date,New,MustNew,Min,Maxand the accessorsYear,Month,Day,IsZero,
MonthLength,YearDay,Weekday,FirstOfMonth,LastOfMonth.- BS to AD and back:
FromGregorianandDate.Gregorian, for BS 1901-01-01 to 2199-12-30. Compare,Before,After.MonthandLangwithName,ShortNameandString;WeekdayName,WeekdayShortName.- Errors
ErrOutOfRange,ErrInvalidMonth,ErrInvalidDay,ErrInvalidGregorianand
ParseError. - Arithmetic:
AddDays,AddMonthsandAddYearswithClamporSpill,Next,Prev,
DaysUntilandDiff. - Fiscal years:
FiscalYear,FiscalYearOf,Quarter, withStart,End,Range,
QuarterRangeandLabel. RangewithNewRange,MonthRange,YearRange,Len,ContainsandDays.- Formatting:
String,Short,LongandFormat, each with anAppendtwin that doesn't
allocate;DateOrder,Separator,LongOptions;Lang.AppendDigitsfor Devanagari digits. - Parsing: strict
Parse(ASCII or Devanagari digits) andParseLenientfor month names, era
markers and day-first dates. - Package
patro:Of,InfowithTithi,IsPublicHoliday,Events,EventCountand
Event,CoverageandPublicHolidays, for BS 2077-01-01 to 2084-08-20. Tithi names end
earlier, at BS 2083-12-30 (AD 2027-04-13). Packagenepdatedoesn't import it. - Text marshalling as
YYYY-MM-DD(MarshalText,AppendText,UnmarshalText), so aDate
works withencoding/json, including as a map key. FromTime,Date.TimeandToday.- Runnable examples for every exported function and type, including arithmetic, fiscal years,
ranges, JSON marshalling and the patro queries. - Go 1.24 or later. CI tests the minimum supported version, Go 1.24.13 (ADR-0008).
Install
go get github.com/sanamhub/nepdate-go@v0.1.0-beta.1
Verification
- The module is served by proxy.golang.org and its hash is recorded in sum.golang.org, so
go getchecks it against the public checksum database. - After this release, a consumer module fetched the version from the proxy and converted
a date and read a patro event on Linux, macOS and Windows (verify-published).