[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Date function


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.


Follow-Ups:
Re: Date functionJussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
References:
Date functionGianluigi <gradobag@xxxxxxxxxxx>
Re: Date functionJussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
Re: Date functionBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Date functionJussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
Re: Date functionBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Date functionJussi Lahtinen <jussi.lahtinen@xxxxxxxxx>