Page 3 of 4

Re: DateEx: Extended Date library

Posted: Fri Dec 29, 2023 9:20 pm
by Little John
victorprogra wrote: Fri Dec 29, 2023 7:05 pm Runs Perfect! on macOS (intel)
I'm glad to read that. :-) You are welcome!
Thank you for your kind and detailed feedback!

Re: DateEx: Extended Date library

Posted: Sun Jan 14, 2024 11:36 pm
by Little John
New version 2.00, 2024-01-14

Fixed
  • Bug in Procedure DateDiff()
Changed
  • improved error handling
  • cosmetic changes
  • extended and improved comments
New
  • Many procedures now have the additional optional parameter 'calendar', so that they can use the Julian calendar even for dates after 1582-10-04.
  • Procedure Easter() now can also calculate dates for the Julian calendar.

Re: DateEx: Extended Date library

Posted: Sun Jan 14, 2024 11:39 pm
by Little John
With version 2.0 of the module, you can now easily convert dates from the Julian calendar to the Gregorian calender and vive versa.
For instance, the Orthodox Catholic Church celebrates Christmas on Dezember 25th, according to the Julian calendar.
What is the corresponding date in the Gregorian calendar?
The answer depends on the year in question, because the gap between the Julian and Gregorian calendars increases over time:

Code: Select all

XIncludeFile "DateEx.pbi"
UseModule DateEx

#Mask$ = "%yyyy-%mm-%dd"
Define.q date

date = DateQ(1582, 12, 25, 0, 0, 0, #Julian)
Debug FormatDateQ(#Mask$, date, #Gregorian)    ; 10 days later

date = DateQ(2023, 12, 25, 0, 0, 0, #Julian)
Debug FormatDateQ(#Mask$, date, #Gregorian)    ; 13 days later

Re: DateEx: Extended Date library

Posted: Sun Mar 03, 2024 11:35 am
by Little John
New version 2.01, 2024-03-03

Changed
  • Fixed bugs
  • Renamed procedure TimeZoneOffset() to TimeZone()
  • New public procedure TimeZoneStr()
  • New public procedure BlackFriday()

Re: DateEx: Extended Date library

Posted: Fri Apr 26, 2024 3:41 pm
by ebs
I know it's dumb to ask "Why do I get this error?" when using an ancient version of PureBasic (5.43 LTS), but I'm stuck here for business reasons.

My problem is this Linker error I get when compiling DateEx on Windows 11:

POLINK: error: Unresolved external symbol '_Time'.
POLINK: fatal error: 1 unresolved external(s)


I believe the cause is this import statement:

Code: Select all

   ImportC ""
      Time(*tm=#Null)
      localtime(*t.Quad)
   EndImport

Can anyone tell me how to fix this? Thanks!

Re: DateEx: Extended Date library

Posted: Sat Apr 27, 2024 11:30 am
by Little John
I tested the current version 2.01 of my module with PureBasic 5.43 LTS (both 32 bit and 64 bit) on Windows 11 Pro.
But I can't reproduce the problem.

Re: DateEx: Extended Date library

Posted: Wed Oct 30, 2024 11:40 pm
by Little John
New version 2.02, 2024-10-30

Changed
  • Small internal improvement
  • Some comments slightly improved

Re: DateEx: Extended Date library

Posted: Thu Oct 31, 2024 8:05 pm
by dige
Thx Little John. I wanted to give it a quick try. But Assert () is not a function?

Re: DateEx: Extended Date library

Posted: Thu Oct 31, 2024 8:22 pm
by Little John
Hi dige, thanks for your interest.
Assert() comes with PureBasic, but it's hidden. For the Assert() macro to work, the file "PureUnit.res" in PureBasic's "Sdk\PureUnit" subdirectory must be moved to the "Residents" subdirectory.

Re: DateEx: Extended Date library

Posted: Mon Nov 25, 2024 8:48 pm
by Little John
New version 2.03, 2024-11-25

Changed
  • Small internal improvements

Re: DateEx: Extended Date library

Posted: Sat Feb 08, 2025 2:32 pm
by Little John
New version 2.04, 2025-02-08

Fixed
  • Bug in Procedure ParseDateQ()

Re: DateEx: Extended Date library

Posted: Sun Feb 09, 2025 5:44 pm
by Piero
Little John wrote: Sat Feb 08, 2025 2:32 pmParseDateQ()
Works well on Mac (after copying PureUnit.res) Thanks!

PS: I just finished to edit this delirium if you may be interested :)

Re: DateEx: Extended Date library

Posted: Mon Jun 30, 2025 11:59 am
by Little John
New version 2.05, 2025-06-30

New
  • Procedure DateFromDayOfYear (year.i, dayNo.i, calendar.i=#Default)
This version was successfully tested also with PB 6.21 (x64) on
[v] Windows 11
[v] Linux Mint 22.1

Re: DateEx: Extended Date library

Posted: Wed Jul 02, 2025 8:02 pm
by Quin
Very nice. Thanks!

Re: DateEx: Extended Date library

Posted: Thu Jul 03, 2025 4:54 am
by Little John
Thank you, Quin. You are welcome!