Skip to content

Changes

Summary

  1. Rewrite using external functions from ModelicaTime.c (details)
Commit 8cc2d551421bce6760e1aab4abccd4630271574e by modelica
Rewrite using external functions from ModelicaTime.c

* Rewrite DateTime.'constructor'.fromEpoch to utilize ModelicaTime_localtime
* Rewrite DateTime.'String'.formatted to utilize ModelicaTime_strftime
* Rewrite DateTime.epoch to utilize ModelicaTime_difftime
* Add DateTime.'constructor'.fromString utilizing ModelicaTime_strptime

ModelicaTime.[ch] need to be integrated to ModelicaExternalC for later distribution. During development ModelicaTime.c is directly included by the external function declaration.
The file was addedModelica/Resources/C-Sources/strptime.h
The file was addedModelica/Resources/C-Sources/ModelicaTime.c
The file was modified Modelica/Resources/C-Sources/readme.txt (diff)
The file was modified Modelica/Utilities/Internal.mo (diff)
The file was modified Modelica/Resources/BuildProjects/autotools/Makefile.am (diff)
The file was modified Modelica/Resources/BuildProjects/gcc/Makefile (diff)
The file was addedModelica/Resources/C-Sources/ModelicaTime.h
The file was addedModelica/Resources/Licenses/LICENSE_strptime.txt
The file was modified Modelica/Utilities/Time.mo (diff)