Announcement

Collapse

Forum Guidelines

This forum is for finished source code that is working properly. If you have questions about this or any other source code, please post it in one of the Discussion Forums, not here.
See more
See less

Date and Time

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

  • PBWin Date and Time

    As a new PB user, I choose to teach myself this language by porting some date and time routines I had written many years ago in assembler. After all the fun, I gathered up all the code snippets and put together the attached DLL code. I apologize in advance for the mess and inefficiencies as I didn't even think about it much. Open up the PB help, ahh.. there is something that will work and away I went. As the compilied DLL is around 115k or so, I expect it to be simply a code resource that anybody can grab code snippets from and clean up in your expert styles. I know there are already excellent date/time sources and you folks have a guru on the subject although you might find it interesting to see another way to do things and maybe even a few new things might pop up.

    The serial days date format I choose came from the book "Calendrical Calculations" and is a signed 32-bit word representing the number of days since Jan 1, 1 which is "day" 1.

    There shouldn't be too many bugs since I have put millions of calls through most of the critical routines.

    I'm working on a PB version of the Olson TimeZone and have the parsing phase completed. I have to decide on how to store the results. I'm looking at emitting PB DATA statements or maybe even a standalone binary file. Anyway, I'll be inserting the Olson results in this DLL at a later date.

    Enjoy!

    Rick Kelly

    p.s.

    Addendum - If you find errors/bugs in the algorithms or ideas for inclusion, please post in the programming forum and I'll followup there
    Attached Files
    Last edited by Rick Kelly; 3 Sep 2009, 06:42 PM. Reason: Feedback
    ------------------------------------------------------------
    sigpic

    It has come to my attention that certain dubious forces are interpolating their desires in my search for Mom, apple pie and the girl you left behind. Stop it or I'll scream...
Working...
X