Gneric Date(time) Class



  • Hello,

    I have the use case that I need to implement different Calendars that are not Julian or Gregorian. My use Case is actually quite nerdy. (I.E. Implementing the Forgotten Realms, Star Treck or Star Wars Calendars - You get the Idea hopefully)

    QDate seems to quite "hardcoded" only to handle Gregorian and julian Calendar. (And there are even limitations. Whoever implemented this wanted to be historical correct, too :-D )

    Does anyone know if someone has a generic Date (and time?) Libary availible that can be used with QT?
    If there is no such Library, does anyone else has similar needs? I could publish my work then as an own Library extension for QT.

    Thanks for your help.

    Cheers!



  • I don't know much about alternative calendars but this may be a good place to start with. http://howardhinnant.github.io/date_v2.html



  • thanks for the link! This is very interesting indeed, and gives me good design hints.
    However it is not what I am looking for because it is still working with our System (which is defined in ISO 8601 )
    I am looking into not standadized Calendar systems.
    Maybe a Example is in order. (One that is not weired then trying to implement something some people made up for fun.)

    Our Calendar System is linked to the movement of the sun, because the seasons dominate our agriculture. We could use a lunar Calendar instead, which gets unsynced to the seasons quickly. (see Lunar Calendar Wiki article )
    Also some things in our Calendar are only made of definitions. We use a 7 day week definition today. In old Rome they may used a 8 day week period
    There seems to be one Calendar to be synced with Venus or lets just think about the Marsian Calendar.
    You would have to write a new synced system for that and define how to convert those system to each other.

    I am proposing, if anyone else can think of or did some abstract solution for this approach.
    Hmm, maybe I ask in the wrong audience. :P Most modern people will not need sucha feature, and those who might be interested would not read this in this tech forum.

    Hmm, thanks again for the link, and he self enlightenment I just experienced. :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.