Moonrise and Moonset Date

Brian,

I have contacted Ken True about a problem I was having with Moonrise and Moonset dates. Below is our correspondence. Could you look at this?

Thanks,

Hugh

BEGIN INCLUDED MESSAGE

Looks like the Mac version is not fully honoring the date format for $moonrisedate and $moonsetdate.
testtags.php?sce=view shows:

$datefmt = ‘m/d/y’; // = ‘d/m/y’, ‘m/d/y’
$uomdistance = ‘km’; // = ‘mi’,‘km’ (for windrun variables)
//
// General OR Non Weather Specific/SUN/MOON
// ========================================
$time = ‘01:50 AM’; // current time
$date = ‘11/1/2015’; // current date
$sunrise = ‘8:03’; // sun rise time (make sure you have the correct lat/lon
// in view/sun moon)
$time_minute = ‘50’; // Current minute
$time_hour = ‘01’; // Current hour
$date_day = ‘01’; // Current day
$date_month = ‘11’; // Current month
$date_year = ‘2015’; // Current year
$monthname = ‘November’; // Current month name
$dayname = ‘Sunday’; // Current day name
$sunset = ‘18:09’; // sunset time
$moonrisedate = ’ 31/10/2015 '; // moon rise date
$moonrise = ‘22:02’; // moon rise time
$moonsetdate = ’ 01/11/2015 '; // moon set date
$moonset = ‘13:06’; // moon set time

I’d ask Brian to fix that little glitch… the moonrisedate and moonsetdate should have the same format as globally specified (in your case,
that’s m/d/y) and they are appearing as d/m/y format.

Best regards,
Ken

Script updates via Twitter at https://twitter.com/saratogaWXPHP
On 10/31/2015 11:39 AM, Hugh Whalen wrote:
To: Webmaster

From:
Hugh Whalen
[email protected]

Base for template:
Canada

Plugin for template:
Weather-Display

Your personal weather website URL
www.flowers-cove.ca

Message:
If you look at my website www.flowers-cove.ca you will see that the
Almanac section has 2 errors. The New Moon and Full Moon show the
month and year but – instead of the day.

Also on the side in the Sun/Moon section it says Sunlight Hours
Unavailable but my testtags.php file shows:

$hoursofpossibledaylight = ‘10:06’; // Total hours/minutes of possible
daylight for today

Do you have any idea why this might be happening?

Thanks,

Hugh

Sent from (ip address): 204.237.80.135 (204.237.80.135)
Date/Time: October 31, 2015, 11:39 am PDT
Coming from (referer): http://saratoga-weather.org/contact.php
Using (user agent): Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2)
AppleWebKit/601.3.5 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.5

END INCLUDED MESSAGE

the library for moon functions returns the date format most of the world uses
I will need to parse out and flip that around if the date format used is not what most of the world uses
I will do that for that next update

If there’s a simple change I could make in the PHP files … I could do that …

Living in Canada I am continually looking at date formats of mm/dd/yy as well as dd/mm/yy

It is endlessly frustrating.

Hugh

made that date change for those 2 custom tags in latest update, build 259,ready now

@Hugh Whalen
has the update resolved this?

No, it has not resolved the problem. See images below.

The problem with the sunlight hours occurred a few weeks ago when you updated the moon settings. I meant to post about this at that time but never got around to it. I believe the problems with the moon settings occurred at the same time.

At one time I thought it was a problem with the Ajax scripts which is why I contacted Ken True.


Screen Shot 2015-11-05 at 7.47.53 AM.png

Screen Shot 2015-11-05 at 7.48.14 AM.png

first thing first
are those dates in the those custom tags now the way around that they need to be

Here is the data from testtags.php

$moonrisedate = ‘11/06/2015’; // moon rise date
$moonrise = ‘1:59’; // moon rise time
$moonsetdate = ‘11/06/2015’; // moon set date
$moonset = ‘14:54’; // moon set time
$nextnewmoon = ‘01:31 UTC November 11 2015’; // Date/time of the next new moon for next month
$fullmoondate = ‘October 27 2015’; // Date of the next/last full moon (date only)

So, yes it appears they are now correct …

Hugh

so the problem might be somewhere else re the sunlight hours…
maybe Ken can help again

I just looked at an old testtags.php file that I had

the old one said
$hoursofpossibledaylight = ‘15:42:00’; // Total hours/minutes of possible daylight for today

the new one said
$hoursofpossibledaylight = ‘09:52’; // Total hours/minutes of possible daylight for today

So, one has seconds and the other does not. Could this be the problem?

I have sent a message to Ken. Perhaps he can help.

Hugh

I could add seconds if that is the problem

Hugh,

Your testtags.php?sce=view shows

$hoursofpossibledaylight =  '09:52';	// Total hours/minutes of possible daylight for today

and that value is directly from the WD tag %hoursofpossibledaylight%

You are also using the alternative dashboard (from Scott at BurnsvilleWeather), which is not my script, but Scott’s V6.92 script.

Ken,

Sorry, I did not recognize the distinction. I will attempt to contact him.

Thanks again for looking at this.

Hugh

you could experiment by adding in the seconds to the actual file on the web site (in between WD auto updates) to see if that fixes it

Found the error for the daylight hours … YESSSSSS!

It’s the $changeinday variable.

It used to be of the form $changeinday = ‘00:00:49’; // change in day length since yesterday

Now it is $changeinday = ‘:54’; // change in day length since yesterday

I went and manually changed it to to the old format of hh:mm:ss and it works!

Now we just have to find the full and new moon error.


IMG_0053.jpg

so the changeinday custom tag is not returning a correctly formated value?

Yes, that is correct. It should be hh:mm:ss and that will fix the problem.

I have also determined that there is no problem with WDisplay and the full and new moon error on my page. It is a problem with the php script. So you can stop looking at that. If you could fix the format of the changeinday custom tag I think your part in this is done.

Thank you very much for the time you have spent on this.

I have to go to a dinner party in a few minutes. Tomorrow I will post on how I changed the php file to fix this.

Hugh

I will work on that custom tag for the next update

new update ready
civil twilight working now too