Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Calendar and Clock

Calendar and Clock
Thread Tools
sdilley14
Mac Elite
Join Date: May 2005
Location: La Crosse, WI
Status: Offline
Reply With Quote
Aug 2, 2006, 01:17 AM
 
Hey, just wondering if anyone knows where I could find a JavaScript or some other code for a professional, clean, small calendar and clock to put on the website I'm developing. Not a big deal but I'd like to add a professional looking clock and/or calendar to add another neat looking element to the page. The page is almost finished and it's looking excellent. The page is actually for a financial firm I work for (mortgage company to be particular), so if anyone has any other elements I should add or other suggestions things to add for this sort of website, I'd appreciate it.

Thanks!
-Shane D.
2.3 GHz Intel i5 MacBook Pro
iPhone 4 - 16 GB - Black
8gb iPod Nano
     
registered_user
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Aug 2, 2006, 07:12 AM
 
Don't take this the wrong way, but a clock is probably the best way to waste space on a web site.

Perhaps as much as a hit counter.

I have the time and date at a glance on my computer, why waste real estate on your web site with the time when you could fill it with the stuff a visitor is likely to be interested in: relevant content?
     
SirCastor
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status: Offline
Reply With Quote
Aug 2, 2006, 11:46 AM
 
I agree with Registered user, It's a waste of space and computing cycles (Albeit, very few...) to have a clock on your site. If you specifically needed it for some reason, such as "This is the time our clock is set at" in which case you wouldn't want it to be Javascript anyway.

As for the calendar, displaying the day month and year is more appropriate.
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
     
sdilley14  (op)
Mac Elite
Join Date: May 2005
Location: La Crosse, WI
Status: Offline
Reply With Quote
Aug 2, 2006, 03:09 PM
 
I just wanted a small clock with the day's date on it just to put in a little empty corner on the page. Something small, professional looking, and unintrusive.

Wednesday, August 2, 2006 - 2:12 P.M. CST

Something like that. Standard text, small, nothing flashy or complicated. I'll put it on the edge of the page somewhere most likely.

Thanks!
2.3 GHz Intel i5 MacBook Pro
iPhone 4 - 16 GB - Black
8gb iPod Nano
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Aug 2, 2006, 03:13 PM
 
Originally Posted by sdilley14
I was thinking a very small clock...like [---------] that big. Just a little touch to add to an empty corner of the page or something. I suppose I'll keep thinking about it. It'll be very unintrusive and small.

The other problem is that you'll probably need to wrap the clock in a div tag and have the div block reload/refresh periodically. All of this puts a small load on both the server and the browser. What do you gain from this? Not much...

I've developed a little visual calendar thing in PHP, but I'm not sure if it could be adapted for your site. What were you hoping the calendar would do, simply color in the current date within a calendar of the current month? Anything more?
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Aug 2, 2006, 03:15 PM
 
Here is what my calendar script looks like:

http://www.netmusician.org/webkitdemo/itinerary.php
     
sdilley14  (op)
Mac Elite
Join Date: May 2005
Location: La Crosse, WI
Status: Offline
Reply With Quote
Aug 2, 2006, 03:58 PM
 
I like that calendar. I guess I was more so looking for a simple date and time stamp. Our industry revolves around the 9-5 p.m. hours with every formal holiday off. Though the functionality is pretty minimal, I thought it might be nice having a small time stamp on the frills of the page, incase someone was surfing our site and wanted to come to our office or call us, they chould take a glance and see that we were closed for the day or open or whatever. I may just nix the idea all together. No one seems to be able to grasp the logic in it...maybe it is a bad idea.
2.3 GHz Intel i5 MacBook Pro
iPhone 4 - 16 GB - Black
8gb iPod Nano
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Aug 2, 2006, 04:03 PM
 
Originally Posted by sdilley14
I like that calendar. I guess I was more so looking for a simple date and time stamp. Our industry revolves around the 9-5 p.m. hours with every formal holiday off. Though the functionality is pretty minimal, I thought it might be nice having a small time stamp on the frills of the page, incase someone was surfing our site and wanted to come to our office or call us, they chould take a glance and see that we were closed for the day or open or whatever. I may just nix the idea all together. No one seems to be able to grasp the logic in it...maybe it is a bad idea.


Does your site/server support the PHP language? You can do this easily with a bit of PHP.
     
sdilley14  (op)
Mac Elite
Join Date: May 2005
Location: La Crosse, WI
Status: Offline
Reply With Quote
Aug 2, 2006, 04:54 PM
 
Yup, it supports PHP. However, I have NO knowledge of PHP. Like I said, I'm by no means a pro, lol. Are there any easy PHP tutorials to follow?
2.3 GHz Intel i5 MacBook Pro
iPhone 4 - 16 GB - Black
8gb iPod Nano
     
registered_user
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Aug 2, 2006, 06:05 PM
 
name the page with .php instead of .html and do this:

<?php echo date("Y-m-d"); ?>

that'll about do it.

details about Y-m-d are here: http://us2.php.net/date
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Aug 2, 2006, 08:34 PM
 
I like to use:

<?php
echo date ('F j, Y h:i A');
?>

Like registered_user said, you can substitute your own date format just by checking out the URL he provided.
     
sdilley14  (op)
Mac Elite
Join Date: May 2005
Location: La Crosse, WI
Status: Offline
Reply With Quote
Aug 3, 2006, 01:22 AM
 
Awesome. Thanks guys!
2.3 GHz Intel i5 MacBook Pro
iPhone 4 - 16 GB - Black
8gb iPod Nano
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 04:18 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,