[Gambas-user] CDate Documentation
Claus Dietrich
claus.dietrich at freenet.de
Mon Nov 14 22:45:51 CET 2022
>This is why I talked about point #5: it seems that you think Gambas
>understands in some way the usual concept of date. But Gambas doesn't.
>It does not store things like day, month, year... It only manipulates
>timestamp, i.e. absolute time instants.
>Maybe if "Date" datatype and "CDate" functions had been named
>"Timestamp" and "CTimestamp", it would have been more clear?
I am aware of the details of the datatype Date including
how data are stored and I also don't mix up things. The example
in #5 is just a real practical example of a timestamp with UTC
notation represented by a string and communicated over the Internet.
The term timestamp refers to a certain event and doesn't
have to be absolute. The Gambas datatype Date just represents
an absolute value for a particular point of time and CDate
delivers such a value against a certain input argument.
That's a different thing and regrettably the result is only
consistent and usable as timestamp if the input argument
is exactly the current local date and time. This hardly
makes sense to me I am wondering about the intended
practical use of CDate.
Nevertheless, the argument of maintaining compatibility
is fully accepted.
Best regards
Claus
More information about the User
mailing list