Dates and Times

This primer is dedicated to setting up a date and time script using Perl.

provided by: 
Originally published at Internet.com


When I first started putting up JavaScripts, and now this PERL series, one of the big things people want is the ability to post the date and the time. No sweat. This primer is dedicated to just that. I'll tell you that it's little rogher than you might think, but stay with me. We'll get the dates and times up and running.

-----------------------------------

Display the date and time



See the time: See the Script

(This will open in a new window): Here's the code

-----------------------------------

The Funny Thing About Dates and Times



The funny thing about dates and times, and one of the hardest things to get across to students is that computer don't see dates and times like you do. Computers see only numbers. You have to force a computer to display text. Furthermore, computers always start their number counts at zero. If the days of the week start with Sunday, then a computer sees Sunday as day zero. That sort off puts computer returns off by one.

Further furthermore, this doesn't hold true across elements. For instance, it's true for days of the week, months, and the hour of the day, but not for day of the month, minute or second. Confused? ...

Read article at Internet.com site
Related Articles

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML