dbTalk Databases Forums  

Five Fridays in July

comp.databases.pick comp.databases.pick


Discuss Five Fridays in July in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
frosty
 
Posts: n/a

Default Five Fridays in July - 07-06-2011 , 11:41 AM






Whenever the first of July is a Friday, there are five Fridays
(and five weekends) in that month.

It happens this month, July 2011.

A casual analysis might lead one to believe this happens, on
average, every seven years. But it is a /very/ rare event.

Anybody want to guess how many lines in this program's output?


FRI = REM(ICONV('7/1/2011','D'),7)
FOR YR = 2011 TO 0 STEP -1
F = REM(ICONV('7/1/':YR,'D'),7)
IF F = FRI THEN CRT (YR 'R####')
NEXT YR


Here's a clue: it's less than 287.


--
frosty

Reply With Quote
  #2  
Old   
frosty
 
Posts: n/a

Default Re: Five Fridays in July - 07-06-2011 , 12:41 PM






On 7/6/11 10:41 AM, frosty wrote:
Quote:
Whenever the first of July is a Friday, there are five Fridays
(and five weekends) in that month.

It happens this month, July 2011.

A casual analysis might lead one to believe this happens, on
average, every seven years. But it is a /very/ rare event.

Anybody want to guess how many lines in this program's output?


FRI = REM(ICONV('7/1/2011','D'),7)
FOR YR = 2011 TO 0 STEP -1
F = REM(ICONV('7/1/':YR,'D'),7)
IF F = FRI THEN CRT (YR 'R####')
NEXT YR


Here's a clue: it's less than 287.


Uh-Oh... my uniData machine returns a negative number for
the REM() with negative dates! Not as rare as I had thought.
Back to your regularly scheduled programming.

--
frosty

Reply With Quote
  #3  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: Five Fridays in July - 07-08-2011 , 12:26 AM



"frosty" wrote in message news:iv2375$d41$1 (AT) dont-email (DOT) me...

Quote:
Whenever the first of July is a Friday, there are five Fridays
(and five weekends) in that month.

It happens this month, July 2011.

A casual analysis might lead one to believe this happens, on
average, every seven years. But it is a /very/ rare event.

Anybody want to guess how many lines in this program's output?
Hum, I do not think it any different then when a Monday, or any other week
day is the first of the month.

For Friday, we get:
Year = 2011 GAP = 0
Year = 2005 GAP = 6
Year = 1994 GAP = 11
Year = 1988 GAP = 6
Year = 1983 GAP = 5
Year = 1977 GAP = 6
Year = 1966 GAP = 11
Year = 1960 GAP = 6
Year = 1955 GAP = 5
Year = 1949 GAP = 6
Year = 1938 GAP = 11
Year = 1932 GAP = 6
Year = 1927 GAP = 5
Year = 1921 GAP = 6
Year = 1910 GAP = 11
Year = 1904 GAP = 6

Hum, lets now try any other old day - say, Wednesday
We get:

For Wednesday we get:
Year = 2009 GAP = 2
Year = 1998 GAP = 11
Year = 1992 GAP = 6
Year = 1987 GAP = 5
Year = 1981 GAP = 6
Year = 1970 GAP = 11
Year = 1964 GAP = 6
Year = 1959 GAP = 5
Year = 1953 GAP = 6
Year = 1942 GAP = 11
Year = 1936 GAP = 6
Year = 1931 GAP = 5
Year = 1925 GAP = 6
Year = 1914 GAP = 11
Year = 1908 GAP = 6
Year = 1903 GAP = 5


Hum how not very interesting (in a yoda voice!)
it goes 6, then 5, then 6 then 11. It does this for all days of the week.

As we say:

Nothing to see here - move along! (should I find that quote from Star
Wars? - nothing to see here.......)

Of course, having written reservation software and many a calendaring
systems (in FoxPro, in pick, in VB, and several other platforms, the latest
post making the rounds on the internet is really a pile of you know what. I
had to take into account when you have 6 actual weeks that can display on
the form - a bit tight in the old 80 x 24 character days. Dealt with this
math problem for years and years.

The post making rounds on Facebook last week was this one:

<quote>
Subject: July 2011: INTERESTING!

This year, July has 5 Fridays, 5 Saturdays and 5 Sundays. This happens once
every 823 years. This is called money bags. So, forward this to your friends
and money will arrive within 4 days. Based on Chinese Feng Shui the one who
does not forward ..... will be without money. I'm not taking any chances!
</quote>

I laughed when I saw above

Hate to break the news - it just simply how the calendar actually works!

--
Albert D. Kallal
Edmonton, Alberta Canada
Pleasenospam_kallal (AT) msn (DOT) com

Reply With Quote
  #4  
Old   
frosty
 
Posts: n/a

Default Re: Five Fridays in July - 07-08-2011 , 10:27 AM



On 7/7/11 11:26 PM, Albert D. Kallal wrote:
Quote:
This is called money bags. So, forward this to your friends and money
will arrive within 4 days. Based on Chinese Feng Shui the one who does
not forward ..... will be without money.

Hate to break the news - it just simply how the calendar actually works!
Oh NO! I suppose next you'll tell me that I didn't actually win the
Irish Lottery?!? =`;^>

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.