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
- More work on the digital clock code!
Today we begin playing around with replacing those image tags with the correct numbers, depending on what time it is.
- Branching Method
- Getting Started with PERL
- Get It To The Text Box
- Using Colored Text
- Validating Date Entries in Forms
- Font Properties
Related Articles
- Validating Date Entries in Forms
You may wonder how you can ever perform data entry validation for dates in forms. The problem is not so much in the calculations as it is in the wide variety of acceptable date formats around the world.
- Font Properties
- Get It To The Text Box
- Getting Started with PERL
- Using Colored Text
- More work on the digital clock code!
- Branching Method

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