Pythagorean Dates

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Pythagorean Dates

Post by ray.wurlod »

After the excitement of 06-06-06 (fireworks, dancing in the streets, Mexican waves) one is surprised no one noticed that last Thursday was one of the few Pythagorean dates this century (10 AUG 06, that's 10 squared = 8 squared plus 6 squared). According to calculations, future Pythagorean dates include June 10, 2008; December 15, 2009; May 13, 2012; September 15, 2012 and August 17, 2015.

Yes, but how do Pythagoreans celebrate?

And do we need this knowledge in a time dimension in a data warehouse?

Code: Select all

FUNCTION IsPythagoreanDate(TheDate)
Ans = @NULL
If UnAssigned(TheDate) Or IsNull(TheDate) Then RETURN(Ans)

HumanDate = Oconv(TheDate, "D2-YMD")
Year = Field(HumanDate, "-", 1, 1)
Month = Field(HumanDate, "-", 2, 1)
Day = Field(HumanDate, "-", 3, 1)

Ans = @FALSE
* Pythagorean date not possible if any two components equal.
If Year = Month Or Year = Day or Month = Day Then RETURN(Ans)

Begin Case
   Case Year > Month And Year > Day
      Ans = ((Year * Year) = (Month * Month) + (Day * Day))
   Case Month > Year And Month > Day
      Ans = ((Month * Month) = (Year * Year) + (Day * Day))
   Case Day > Year And Day > Month
      Ans = ((Day * Day) = (Year * Year) + (Month * Month))
End Case

RETURN(Ans)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

Hmm,
Would there be a seemingly crazy requirement to Exclude Pythagorean dates from Business Calendar? :lol:
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The longer I remain in this business the crazier are the business "requirements" that I encounter!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply