Advertisement

04.17.2008 at 12:59PM PDT, ID: 23332349 | Points: 500
[x]
Attachment Details

JavaScript Date problem on a MAC

Tags: Javascript, Apple
I normally do dev for IE and primarly on and for a PC but....I have a need for this to work on a MAC.  It is erroring at the point of alert (resumeDate); translating the date to Fri Dec 13 1901 14:45:52 GMT -0600. Any ideas?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
function checkfortest(){
var timeoutval;
var k;
var totalelements;
var numelementsper;
  var results=new Array();
  results[1]="4/16/2008 3:36:18 PM";
  results[2]="FL Volume I Fundamentals";
  totalelements=1;
  numelementsper=2;
 
var timeoutval;
var k;
if ((cintjis(totalelements)*cintjis(numelementsper)) > 0){
timeoutval="480";
k=results[1];
if (!(numericjis(timeoutval))){
timeoutval=10;
}else{
timeoutval=cdbljis(timeoutval);
}
if(k==""){
document.all.bigtable.style.display="";
}else{
var testDate = new Date();
alert(testDate);
alert(k);
 
var resumeDate = new Date(k);
alert (resumeDate);
var diff=(testDate-resumeDate)/(60*60*60);
alert(diff);
if(diff<timeoutval){
document.all.resumetable.style.display="";
}else{
document.all.bigtable.style.display="";
}
}
}else{
document.all.bigtable.style.display="";
}
}
Start your free trial to view this solution
Question Stats
Zone: Software
Question Asked By: kelley_foust
Question Asked On: 04.17.2008
Participating Experts: 2
Points: 500
Views: 0
Translate:
Loading Advertisement...
04.17.2008 at 01:10PM PDT, ID: 21380852

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.19.2008 at 11:03AM PDT, ID: 21393362

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 06:50PM PDT, ID: 21417180

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.24.2008 at 08:42PM PDT, ID: 21436924

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 05:01PM PDT, ID: 21521363

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.08.2008 at 06:59AM PDT, ID: 21524725

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.08.2008 at 10:26AM PDT, ID: 21956018

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
04.17.2008 at 01:10PM PDT, ID: 21380852
Note:  Tested on firefox on MAC and it doesn't screw up the date.
 
04.19.2008 at 11:03AM PDT, ID: 21393362
kelley_foust,
We have sent a message to some of our more experienced Experts asking them to review your question, and will check back again to see if you are getting the help you need.

Please do not respond to this comment or post another request; we are monitoring the notifications from your question for activity from the Experts.

Thank you for using Experts Exchange,

ForestDenizen
Community Support Moderator
http://www.experts-exchange.com/Q_23333478.html
 
04.22.2008 at 06:50PM PDT, ID: 21417180
kelley_foust,
We have made another attempt to get Experts to review your question. We will check back again to see if you are getting the help you need.
Please do not respond to this comment; we will be monitoring your question for activity from the Experts.
 
Thank you for using Experts Exchange,
ForestDenizen
Community Support Moderator
 
04.24.2008 at 08:42PM PDT, ID: 21436924
kelley_foust,
 
We have made several attempts to bring special attention to your question, but they have not been successful. At this point, you may want to consider deleting this question and re-submitting it.
 
You might consider using different, more appropriate zones for your question; please see http://www.experts-exchange.com/allTopics.jsp for a complete list. The more Zones (maximum of three) you post in, the more Experts will see your question.
 
You might consider including [more]/[less] information, keeping your question concise; extraneous information could have caused Experts to shy away from your question.
 
Please do not include information like "Help" or "Urgent" in the title. The question lists are truncated at about 40 characters, so adding those words does not help the Experts identify your problem and a solution.
 
A "Delete Question" link is in the body of your question (the actual first post that is displayed). Clicking on that link should automatically delete the question. There is a "Reason" textbox for you to complete and you can simply insert "No Solution" (or any other reason you like) and we will start the process.
 
Thank you for using Experts Exchange.
 
ForestDenizen
Community Support Moderator
 
05.07.2008 at 05:01PM PDT, ID: 21521363
Does this problem only occur in Safari on Mac OS X? What about the Windows version of Safari? Which version of Safari?
 
05.08.2008 at 06:59AM PDT, ID: 21524725
this problem only occurs on Safari on a mac osX.  Safari on PC was fine.  Also Firefox on MAC was fine.
 
07.08.2008 at 10:26AM PDT, ID: 21956018

Your Mac uses a different time format which causes it to fail. To be standard, I think you should use one of these formats.
new Date("Month dd, yyyy hh:mm:ss")
new Date("Month dd, yyyy")
new Date(yy,mm,dd,hh,mm,ss)
new Date(yy,mm,dd)
new Date(milliseconds)

My personal preference goes to the third and fourth, because they are independent of client-computer's software.

HTH,
John

 
 
20080236-EE-VQP-29 / EE_QW_EXPERT_20070906