Release History
Changelog
All notable changes to NepDate are documented here. Versions follow semantic versioning.
Added
- Full calendar metadata support for
2001–2089 BS including Tithi (lunar day), public holiday flag, and event descriptions in both Nepali and English, exposed through NepaliDate.Calendar returning a CalendarInfo struct.
NepaliDateRange type with intersection, union, except, split-by-month, split-by-fiscal-quarter, working-day and weekend iteration, and interval-based enumeration.
FiscalYear static helpers plus instance methods on NepaliDate for Nepal fiscal year (Shrawan–Ashadh) start, end, quarter detection, and boundary queries.
SmartDateParser with support for 100+ month-name spellings (English, Nepali Devanagari, and transliterations), alternate separators, short-year input, and Nepali Unicode digits.
BulkConvert.ToNepaliDates and BulkConvert.ToEnglishDates with automatic parallelization for datasets over 500 items and explicit batchSize control.
- Native
IParsable<NepaliDate>, ISpanParsable<NepaliDate>, and ISpanFormattable implementations on the net8.0 target.
System.Text.Json and Newtonsoft.Json converters with string-mode and object-mode options.
XmlSerializer support via the NepaliDateXmlSerializer wrapper.
TypeConverter registration for ASP.NET model binding, WPF, and WinForms property grids.
NepaliMonths, DateFormats, Separators, and FiscalYearQuarters enums.
- Custom format strings via
FormatCustom with token support (yyyy, yy, MMMM, MMM, MM, M, dd, d) plus literal quoting and escape sequences.
Improved
- BS → AD conversion path rewritten to use flat-array lookups. Now runs at 4.5 ns/op with zero allocations.
- AD → BS conversion optimized to be over 8,600× faster than the previous version and every competing library.
- Parsing performance improved across all input formats, including Unicode digit handling.
- Internalized
Newtonsoft.Json and System.Text.Json dependencies using PrivateAssets=all, so consumers get a zero-dependency NuGet install.
- Memory layout of
NepaliDate tightened; the type now packs into 4 bytes and is fully stack-allocated.
- Documentation website launched at rajuprasai.github.io/NepDate with full API reference, searchable docs, and runnable examples.
Fixed
autoAdjust on NepaliDate constructor and TryParse now correctly swaps month and day when month is in range 13–31 and day is 1–12, matching the documented behavior. Previously inputs like "2080/13/12" threw instead of yielding 2080/12/13.
- Conversion accuracy at the upper end of the supported year range. Future dates near
2199 BS now resolve correctly.
2082/03 and 2082/04 day-count drift corrected (issue #18).
- English
DateTime round-trip preserves DateTimeKind where applicable.
- Corrected boundary handling at the start and end of the supported year range (
1901 BS and 2199 BS).
- Leap-day handling in
AddMonths and AddYears now clamps correctly when the target month has fewer days than the source.
TryParse no longer throws on empty strings or whitespace; it returns false as documented.
Maintenance
- Repository moved to github.com/rajuprasai/NepDate. Old links continue to redirect.
- Package metadata refreshed (author, project URL, copyright through 2026).
- Test suite expanded to 542 unit tests covering construction, parsing, formatting, conversion, fiscal year, ranges, calendar metadata, and serialization.
Fixed
- AI-driven optimization pass on hot paths in dictionary lookup and parsing.
Breaking
- Namespace reorganization: split into
NepDate.Core, NepDate.Abilities, NepDate.Extensions, NepDate.Exceptions, NepDate.Serialization, and NepDate.TypeConversion.
NepaliDate converted from struct to readonly partial struct. Public API is source-compatible but binary-breaking.
Parse signatures unified. Old overloads removed in favor of optional parameters.
Added
SmartDateParser foundation.
BulkConvert foundation with sequential and parallel modes.
FiscalYear initial API surface.
Initial public releases. Established the core NepaliDate type, bidirectional conversion, basic parsing, and ToString formatting. Target framework was .NET Standard 2.0.
NepaliDate core type.
- BS ↔ AD conversion.
- Basic
Parse and TryParse.
AddDays, AddMonths, AddYears, comparison operators.
DayOfWeek, Year, Month, Day properties.