Skip to content

Releases: soroush/libcalendars

Version 1.0.0 released

27 Sep 07:10
Compare
Choose a tag to compare

This is first public version of this library. This release includes Linux-like source tarballs in tar.gz format and Windows source archives in zip format.

In addition to source release, Windows binaries and test suits are also included. Windows builds are in x86/x64 × Static/Dynamic × 2015/2017 × Debug/Release set. So there is 2×2×2×2=16 archives for Windows. All these files are tagged with following schema:

libcalendars-<version>-<arch>-<msvc>-<build>-<linkage>.zip

For example libcalendars-1.0.0-x86-msvc14-release-shared.zip archive includes 32-bit release builds of shared library (DLL) which are built using Visual Studio 2015 (MSVC 14.0).

Features

Following calendar arithmetic has been implemented:

  • Gregorian
  • Julian
  • Milanković (Revised Julian)
  • Jewish
  • Islamic Civil
  • Solar Hijri (Shamsi, Persian)

For all these calendars, following algorithms are implemented:

  • Convert Calendar Date to Gregorian Date;
  • Convert Gregorian Date to Calendar Date;
  • Convert Calendar Date to Julian Day Number;
  • Convert Julian Day Number to Calendar Date;
  • Leap year detection;
  • Days in year, Days in month, Month in year.

Known Bugs

  • Algorithm for Islamic Civil calendar takes +1/-1 day offset for years before -1600. Currently smallest supported JDN is 1380036
  • Jewish calendar leap year is known to be wrong for many year numbers. This leads to have wrong number of days in year, days in month and months in year. So all above functions return zero for now.

Issues

  • Jewish calendar arithmetic is tens times slower than other calendars. These algorithms are being improved. Optimized versions will be released in next release.