Fedora Linux Support Community & Resources Center
  #1  
Old 3rd January 2015, 12:08 AM
lsatenstein Offline
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 3,895
windows_7firefox
A programming challenge.

This challenge has to do with dates.

Can you calculate the next time that New Years day and the day of a Full moon coincide for where you live? Consider where you reside in gmt -x or in gmt +x?
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
  #2  
Old 3rd January 2015, 01:32 PM
ocratato Offline
Registered User
 
Join Date: Oct 2010
Location: Canberra
Posts: 2,493
linuxfirefox
Re: A programming challenge.

It does appear to be a rather complex calculation.

The time between full moons, the synodic month, averages at 29.530588853 days but it varies rather widely between 29.272 and 29.833 days depending on a range of factors such as the time of year and the precession of the moons orbit.

There is a formula in Wikipedia http://en.wikipedia.org/wiki/New_moon but that can be out by over 6 hours for any given month due to those influences.
__________________
Has anyone seriously considered that it might be turtles all the way down?
That's very old fashioned thinking.
The current model is that it's holographic nested virtualities of turtles, all the way down.
Reply With Quote
  #3  
Old 4th January 2015, 01:58 AM
lsatenstein Offline
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 3,895
windows_7firefox
Re: A programming challenge.

Hi Ocratato

This puzzle came to me at 0:0:2015 (gmt -5). I would the julian date (days since 1 1 1 )
I would allow for a tolerance of 12 hours. I think we should be just multiplying by the 29.5 average and also the year *365.25 (forget year 100's for now). I would convert the liner full moon date to a julian date and then look for coincidences.
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
  #4  
Old 4th January 2015, 03:04 AM
ocratato Offline
Registered User
 
Join Date: Oct 2010
Location: Canberra
Posts: 2,493
linuxfirefox
Re: A programming challenge.

Another reference: http://astropixels.com/ephemeris/moo...month2001.html

While it is your puzzle and you can set the parameters as you see fit, it does seem a bit odd to include the time zone, but leave out a variation of up to 6 or 7 hours.

The danger is this rough calculation will be taken by someone and used as though it were accurate. Unfortunately, without a copy of "Astronomical Algorithms" or similar it is going to be difficult to obtain a suitably accurate formula. (One idea might be to apply a Fourier transform to the data in the above web reference.)
__________________
Has anyone seriously considered that it might be turtles all the way down?
That's very old fashioned thinking.
The current model is that it's holographic nested virtualities of turtles, all the way down.
Reply With Quote
Reply

Tags
challenge, programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Challenge: Encrypt a string RupertPupkin Programming & Packaging 41 16th April 2016 04:05 AM
Programming challenge: Query a database RupertPupkin Programming & Packaging 196 23rd March 2016 04:18 AM
Programming challenge: Approximate an area RupertPupkin Programming & Packaging 211 10th August 2015 12:40 AM
Programming challenge: Send an email RupertPupkin Programming & Packaging 13 1st December 2014 12:33 PM
Programming challenge: Create a chart RupertPupkin Programming & Packaging 28 18th September 2013 12:14 AM


Current GMT-time: 17:13 (Monday, 24-04-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat