Suppress the Date() limitation

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
charvista
Addict
Addict
Posts: 943
Joined: Tue Sep 23, 2008 11:38 pm
Location: Belgium

Suppress the Date() limitation

Post by charvista »

I believe it is now high time to support years after 2037.

Code: Select all

For i=2019 To 2040
    Debug Str(i)+" : "+Date(i,12,31,23,59,59)
Next i
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Suppress the Date() limitation

Post by davido »

+1
DE AA EB
User avatar
Tenaja
Addict
Addict
Posts: 1949
Joined: Tue Nov 09, 2010 10:15 pm

Re: Suppress the Date() limitation

Post by Tenaja »

+1
BarryG
Addict
Addict
Posts: 3318
Joined: Thu Apr 18, 2019 8:17 am

Re: Suppress the Date() limitation

Post by BarryG »

+1
User avatar
thyphoon
Enthusiast
Enthusiast
Posts: 327
Joined: Sat Dec 25, 2004 2:37 pm

Re: Suppress the Date() limitation

Post by thyphoon »

+1 and before 1970 :P
Seymour Clufley
Addict
Addict
Posts: 1233
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Re: Suppress the Date() limitation

Post by Seymour Clufley »

+1
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
wayne-c
Enthusiast
Enthusiast
Posts: 335
Joined: Tue Jun 08, 2004 10:29 am
Location: Zurich, Switzerland

Re: Suppress the Date() limitation

Post by wayne-c »

thyphoon wrote:+1 and before 1970 :P
+1000000

:-)
As you walk on by, Will you call my name? Or will you walk away?
Rinzwind
Enthusiast
Enthusiast
Posts: 638
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: Suppress the Date() limitation

Post by Rinzwind »

Yup, very silly that the 64 bit version didn't extend the range. We're stuck with a very limited date range. 2039 is the end-of-ages (or PB) apparently ;)
User avatar
Lord
Addict
Addict
Posts: 849
Joined: Tue May 26, 2009 2:11 pm

Re: Suppress the Date() limitation

Post by Lord »

thyphoon wrote:+1 and before 1970 :P
That's gonna be a little difficult.
How far back should the date go?
Remember: There are many dates when the Gregorian
calendar was introduced in different parts of the world.
You have to check for each area which calendar was
valid on the corresponding date.
Image
User avatar
thyphoon
Enthusiast
Enthusiast
Posts: 327
Joined: Sat Dec 25, 2004 2:37 pm

Re: Suppress the Date() limitation

Post by thyphoon »

The Gregorian calendar is the internationally accepted civil calendar that was first adopted in 1582
:wink:
User avatar
Lord
Addict
Addict
Posts: 849
Joined: Tue May 26, 2009 2:11 pm

Re: Suppress the Date() limitation

Post by Lord »

thyphoon wrote:The Gregorian calendar is the internationally accepted civil calendar that was first adopted in 1582
:wink:
...but wasn't introduced in every part of the world at the same time. :!:
Image
User avatar
thyphoon
Enthusiast
Enthusiast
Posts: 327
Joined: Sat Dec 25, 2004 2:37 pm

Re: Suppress the Date() limitation

Post by thyphoon »

Lord wrote:...but wasn't introduced in every part of the world at the same time. :!:
Yes but, who can do more can do less.
the majority will use it for dates until 1900 or maybe 1800 but not before.
User avatar
C87
Enthusiast
Enthusiast
Posts: 176
Joined: Mon Jul 17, 2017 7:22 am
Location: Cotswolds England

Re: Suppress the Date() limitation

Post by C87 »

In England the Gregorian calendar was used from 1752 if I recall correctly. For anyone who has involved themselves in geneology they will have to be
careful to check their dates around that time. When completing their records, some churches decided that they'd not have anything to do with all that
new fangled stuff and continued with the Julian calendar. Which is not helpful when you are loking at this stuff nearly 300 years later! You always need
to double check any dates from 1752 to say 1760. Just in case. :lol:
If it's falling over......just remember the computer is never wrong!
User avatar
Lord
Addict
Addict
Posts: 849
Joined: Tue May 26, 2009 2:11 pm

Re: Suppress the Date() limitation

Post by Lord »

Only a rough overview:
Wikipedia wrote:Year Country/-ies/Areas
1582 Spain, Portugal, France, Poland, Italy, Catholic Low Countries, Luxemburg, and colonies
1584 Kingdom of Bohemia
1610 Prussia
1648 Alsace
1682 Strasbourg
1700 'Germany',[Note 8] Swiss Cantons, Protestant Low Countries, Norway, Denmark
1752 Great Britain and colonies
1753 Sweden and Finland
1873 Japan
1875 Egypt
1896 Korea
1912 China, Albania
1915 Latvia, Lithuania
1916 Bulgaria
1918 Russia, Estonia
1919 Romania, Yugoslavia[Note 9]
1923 Greece
1926 Turkey
2016 Saudi Arabia
(https://en.wikipedia.org/wiki/Gregorian_calendar)
For example: 1700 'Germany',[Note 8] Swiss Cantons, Protestant Low Countries, Norway, Denmark
This date is not generally true.
In these areas there were further different dates for the adoption of the new calendar.
Image
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Suppress the Date() limitation

Post by IdeasVacuum »

+1
Similarly, not all regions of China - in fact some records only go back 60 years or so.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply