WXforum.net
May 22, 2013, 06:29:38 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
Members: 6617  •  Posts: 178541  •  Topics: 18117
Please welcome TheMOX, our newest member.
Welcome to the the new hosting for WXforum.net.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Date format  (Read 753 times)
0 Members and 1 Guest are viewing this topic.
jdpsys
Member
*
Offline Offline

Posts: 20



WWW
« on: April 30, 2012, 08:02:53 PM »

I'm using Meteohub and a Davis Station.

I would like the date formate to be APR 30 2012 instead of 30/04/2012

Looked in the settings, but seems I'm overlooking something.

Thanks
Logged

Jon
Davis Vantage Pro II - Meteohub (4.9 b929 - SheevaPlug)
http://www.fairfieldwx.com
jdpsys
Member
*
Offline Offline

Posts: 20



WWW
« Reply #1 on: April 30, 2012, 08:04:03 PM »

Forgot to add

www.fairfieldwx.com
Logged

Jon
Davis Vantage Pro II - Meteohub (4.9 b929 - SheevaPlug)
http://www.fairfieldwx.com
jdpsys
Member
*
Offline Offline

Posts: 20



WWW
« Reply #2 on: May 01, 2012, 07:34:46 AM »

I set WDdateMDY = false  and when I refresh the page the date shows up as 1 May 2012 untill the page completes loading, then it reverts back to 1/5/2012

Logged

Jon
Davis Vantage Pro II - Meteohub (4.9 b929 - SheevaPlug)
http://www.fairfieldwx.com
saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3730


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #3 on: May 01, 2012, 01:34:44 PM »

Unfortunately, the AJAX routine does not provide a Mon dd yyyy format for display, only dd/mm/yyyy or mm/dd/yyyy format are available.  I suggest you choose the numeric-only format for display.

Sorry...

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
jdpsys
Member
*
Offline Offline

Posts: 20



WWW
« Reply #4 on: May 01, 2012, 01:43:29 PM »

Not a big problem.

How do I get it to show mm/dd/yyyy ?
Logged

Jon
Davis Vantage Pro II - Meteohub (4.9 b929 - SheevaPlug)
http://www.fairfieldwx.com
saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3730


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #5 on: May 01, 2012, 02:11:54 PM »

Use in Settings.php
Code:
$SITE['dateOnlyFormat'] = 'm/d/Y';

BTW.. the reason the AJAX routines don't have Month abbreviations available is due to the lack of abbreviated month names in the language scripts .. the language-LL.js scripts have full month names, but not all languages use the first 3 characters as the abbreviation, so it was just easier to avoid the issue Smile

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
jdpsys
Member
*
Offline Offline

Posts: 20



WWW
« Reply #6 on: May 01, 2012, 02:42:50 PM »

Now it shows 05/01/2012 until the gizmo updates, then shows 01/05/2012

Logged

Jon
Davis Vantage Pro II - Meteohub (4.9 b929 - SheevaPlug)
http://www.fairfieldwx.com
saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3730


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #7 on: May 01, 2012, 02:59:31 PM »

It's due to Meteohub clientraw.txt showing the date as '01/05/2012' instead of Weather-Display's clientraw.txt which has '05/01/2012' and the ajaxMHwx.js script just uses the value of clientraw[74] for display.

I'll need to add some code to ajaxMHwx.js to allow selection of MDY or DMY formats for the dates...

Should be ready shortly.

Best regards,
Ken

Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
jdpsys
Member
*
Offline Offline

Posts: 20



WWW
« Reply #8 on: May 01, 2012, 03:37:36 PM »

THANKS! suspected that was it.

New visistors to my site are already pinging me about it

Logged

Jon
Davis Vantage Pro II - Meteohub (4.9 b929 - SheevaPlug)
http://www.fairfieldwx.com
saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3730


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #9 on: May 01, 2012, 04:39:16 PM »

Ok... try the attached (save as ajaxMHwx.js)

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
jdpsys
Member
*
Offline Offline

Posts: 20



WWW
« Reply #10 on: May 01, 2012, 04:49:58 PM »

thank you!
fixed now.
Logged

Jon
Davis Vantage Pro II - Meteohub (4.9 b929 - SheevaPlug)
http://www.fairfieldwx.com
saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3730


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #11 on: May 01, 2012, 04:54:20 PM »

Great!

I've added your site to the list also Smile

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.099 seconds with 19 queries.
anything