Skip to content

Repository files navigation

Date Converter Library

The dateconv library is a free and open-source C library that provides date conversion between multiple calendar systems, including Persian, Gregorian, Islamic, Hebrew, and Julian calendars. It supports both shared and static builds on GNU/Linux, macOS, and Windows.

The core date-conversion functions were originally written in JavaScript by John Walker and released into the public domain. The functions were ported to C by Aboutaleb Roshan, with a few minor features added.

This library supports two variants of the Persian calendar:

  • Astronomical
  • Algorithmic

The algorithmic implementation is based on Ahmad Birashk's proposed algorithm.

This library is in the public domain.

Building the Library

For complete build, test, installation, cleaning, and compiler environment instructions, see BUILDING.md.

Please refer to this guide when compiling the library. It contains the exact commands for every supported workflow and explains how to choose the correct platform, compiler, generator, and shared/static configuration.

Supported Build Systems and Workflows

Build system or workflow Description
GNU Make Uses the standalone project Makefile directly.
GNU Autotools Uses configure.ac, configure, Automake, Libtool, and GNU Make.
CMake with Unix Makefiles Generates Makefiles for GCC or Clang on GNU/Linux and macOS.
CMake with MinGW Makefiles Generates Makefiles for MinGW-w64 on Windows.
CMake with Ninja Generates Ninja build files on GNU/Linux, macOS, and Windows.
CMake Presets Provides predefined Ninja configurations for both, shared-only, and static-only builds.
Meson Supports both, shared-only, and static-only configurations, normally using Ninja as its backend.
CMake with NMake Builds with Microsoft Visual C/C++ and NMake from a Visual Studio developer environment.

Build Behavior

  • Both shared and static libraries are supported.
  • By default, workflows build both shared and static libraries, unless a more specific option is selected.
  • A test target builds the test executable separately.
  • A check target builds and executes the test.

PGP Public Key

The source files are signed with the following key:

Reporting Bugs

If you encounter a bug or unexpected behavior, please send a report to:

ab.roshan39@gmail.com

About

Date Converter Library

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages