View Full Version : starting 1st js - date tooltips

01-21-2005, 03:33 AM
I'm starting to write my 1st USEFUL javascript script. I kinda know what it's gonna look like and what it's gonna involve, but i'm not sure how to do it and how to start.

Here's what I want my script to do:
1) Search the document for a date, such as 1-10-05
2) Add a tooltip (title="") to the date, so when you mouseover 1-10-05, you see January 10, 2005

Some features i want to include:
1) Determine what type of date or an option to adjust date type
ex: 1-10-05 could mean october 1, 2005. so in the script, u can define the date type, like dd-mm-yy or yyyy-mm-dd etc...
2) Tooltip display options. January, or Jan etc....

I kinda know what I'm gonna need in the script. I just dont know how to start.

01-21-2005, 04:59 AM
The String, Number, and Array objects, an argument, and an if else statement, methinks... maybe the Date object too. :)