A modern Fortran library for date and time manipulation with millisecond precision.
datetime-fortran is a modern Fortran library for date and time manipulation that provides comprehensive datetime, timedelta, and clock types. It solves the problem of handling dates and times in Fortran applications with millisecond precision, offering functionality similar to Python's datetime module while maintaining Fortran's performance characteristics.
Fortran developers working on scientific computing, numerical simulations, data analysis, or any application requiring precise date and time calculations and representations.
Developers choose datetime-fortran because it provides a complete, modern datetime API for Fortran with Python-like usability, ISO 8601 compliance, timezone support, and seamless integration with existing Fortran codebases and build systems.
Date and time manipulation for modern Fortran
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Mimics Python's datetime module with intuitive types like datetime and timedelta, reducing the learning curve for developers familiar with Python, as evidenced by the comprehensive operator overloading and method names.
Provides robust datetime, timedelta, and clock types with full arithmetic, comparison operators, and ISO 8601 formatting, enabling complex time manipulations like simulations and data analysis workflows.
Includes tm_struct compatibility and wrapper functions like c_strftime and strptime, facilitating seamless integration with C/C++ libraries for mixed-language projects.
Supports multiple build systems including FPM, autotools, and CMake, making it easy to integrate into existing Fortran projects with minimal setup, as detailed in the Getting Started section.
Explicitly stated in the README that the datetime type does not support DST information, limiting its accuracy for applications in regions with seasonal time changes.
On Windows, requires including an additional C++ file (strptime.cpp) in the project, adding an extra step and potential compatibility issues for cross-platform development.
Uses a fundamental time step of one millisecond, which may be insufficient for applications requiring microsecond or nanosecond precision, such as high-frequency trading or precise scientific measurements.
Being a Fortran-specific library, it relies on a smaller community and fewer tooling resources compared to more popular languages, which can slow down troubleshooting and adoption.