Announcement

Collapse
No announcement yet.

Technical update Gregorian Date Library

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Technical update Gregorian Date Library

    For a couple of reasons I've updated my Gregorian Date Library and its demo sources. The most important modification is due to a bug in Windows XP (maybe Vista too, I don't know). The system returns a wrong "long" date through the GetDateFormat API when using the Locale Identifier (LCID) for Cataluña = 1027. Windows uses the forward slash here, which is in fact the separator for the short date. This is what XP returns: "dissabte, 23 / febrer/ 2008". I've corrected that in the library's function GregLongDate. So this Catalonian long date is now shown as "dissabte, 23 de febrer de 2008" and when a month name starts with an a (for instance: abril) it is: "d'abril de 2008".

    Also I have 2 separate functions now for a long date and a short date:
    • GregLongDate
    • GregShortDate

    This was necessary because a 2-digit year prior to 1601 was not correctly returned by the GregDateFormat function. You can download it here: http://zijlema.basicguru.eu/files/gregorian.zip
    Last edited by Egbert Zijlema; 23 Feb 2008, 05:17 PM. Reason: Download address added

    Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
    http://zijlema.basicguru.eu
    *** Opinions expressed here are not necessarily untrue ***

  • #2
    Sorry, but the above mentioned approach was wrong

    To all users of my Gregorian Date Library.
    Please accept my apology for this inconvenience, but the way I pointed out in the above message is not the proper way to go. So there is a "new" technical update available now, using only one routine for the Windows API-function GetDateFormat: GregDateFormat. It not only repairs the Catalonian date-bug, but works as far as I've experienced correctly now with all possible dwFlags-settings, including the short date.
    And... it processes all calendar dates in the Gregorian Calendar, including the period from the first day (October 15, 1582) until 1601, a period Windows itself does not recognize!
    You can download it here: http://zijlema.basicguru.eu/files/gregorian.zip

    Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
    http://zijlema.basicguru.eu
    *** Opinions expressed here are not necessarily untrue ***

    Comment


    • #3
      Swedish date bug also repaired

      The newest version (time stamp 08:03) repairs both date bugs now: the Catalonian and the Swedish. See also: http://www.powerbasic.com/support/pb...ad.php?t=36561

      Download it here: http://zijlema.basicguru.eu/files/gregorian.zip

      Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
      http://zijlema.basicguru.eu
      *** Opinions expressed here are not necessarily untrue ***

      Comment


      • #4
        British and Welsh full date also repaired

        I just posted a new version of the Gregorian Date Library, time stamped: 08:04. Sorry to say so, but this version again repairs a couple of malformatted dates, the long or full date for the UK and the one for Wales. Windows' GetDateFormat API-function returns both without the commonly used name of the day.

        Get your fresh copy here: http://zijlema.basicguru.eu/files/gregorian.zip

        Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
        http://zijlema.basicguru.eu
        *** Opinions expressed here are not necessarily untrue ***

        Comment

        Working...
        X