[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Date function
[Thread Prev] | [Thread Next]
- Subject: Re: Date function
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Thu, 6 Nov 2025 00:11:33 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 05/11/2025 à 23:33, Jussi Lahtinen a écrit :
Paper calendar shows dates, not timestamp.
You can't think correctly about this subject if you are making a
confusion between dates and timestamps.
Semantics. Then Gambas needs actual Dates.
This is what I meant in the wiki when I wrote: "This could be an interesting development to do: adding support for different calendars, with transparent conversion between Gambas dates and local dates."
A date will not be able to be named "Date", as it's already used, so it will have to be named "CalendarDate" or something like that.
Then one function for converting a "CalendarDate" to a "Date" and another one for the contrary must be written for each type of calendar in the world: Gregorian, Julian, Muslim, Hebraic, Chinese...
There is a full list here: https://en.wikipedia.org/wiki/List_of_calendars Almost one hundred of different calendars!The same way "Date" string representations need a timezone, "CalendarDate" string representation will need a calendar type.
Of course it is more complex that I just said: a type of calendar usually has many ways of representing a date as a string.
A complex project to do for anyone who dares. Regards, -- Benoît Minisini.
| Re: Date function | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |
| Date function | Gianluigi <gradobag@xxxxxxxxxxx> |
| Re: Date function | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |
| Re: Date function | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
| Re: Date function | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |
| Re: Date function | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
| Re: Date function | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |