|
IntroductionEiffelTime is the Eiffel library that allows you to use efficiently Date and Time in your projects. Before using EiffelTime, we suggest you to read this documentation.:
Technical InformationThe library EiffelTime is built on three notions of time.
The library is located in $EIFFEL5/library/time. You can find a detailed description of EiffelTime here. You need EiffelTime to use EiffelStore library. Getting StartedBy default, all the files you need are installed by the installation procedure of your product. In the case, where the following library `libdatetime.a' (for Unix) or `datetime.lib' (for Windows) was not found during the C comnpilation, use the following instructions to recreate them:
To install EiffelTime, you need to go to the directory $EIFFEL5\library\time\Clib and run make_msc.bat if your C compiler is Microsoft or make_bcc if Borland.
Just launch finish_freezing - library in the directory $EIFFEL5\library\time\Clib. How to configure your Ace fileIn order to use EiffelTime in an Eiffel Project, you have to include in your project, the correct clusters and external files. Thus, you need to configure your Ace file. You can get all the information about Ace files here. To include the EiffelTime cluster you need to include in your ace file : eiffel_time:
"$EIFFEL5/library/time"; You also need to include the external object datetime.lib (under windows) or libdatetime.a (under unix): object: "$(EIFFEL5)/library/time/spec/$(COMPILER)/lib/datetime.lib (for Windows) object: "$(EIFFEL5)/library/time/spec/$(PLATFORM)/lib/libdatetime.a (for Unix) You can check the Ace file of our example to see a working Ace file using EiffelTime. Date-Time String conversionThe following list format conversion codes. These are all nicked direct from Excel:
Here are some examples of suggested STRING output.
A working ExampleWe developed an example that you can try to see how to use EiffelTime. It is located in the directory: $EIFFEL5/examples/time/calculator. To run this example, launch eiffel_time_calendar once you have compiled it. Then on the prompt, you can enter :
|