Welcome To Snipplr
Everyone's Recent JavaScript Snippets Tagged date
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This script displays the current date inside a form via 3 prefilled drop down menus (day, month, year). The visitor can then specify a different date if he/she wants. You can have multiple drop down dates within the same form as well.
0
892
posted 15 years ago by kanampo
Very easy to use JS Calendar Control with so many customization options.
0
810
posted 15 years ago by design2develop
A simple JS script to validate a date. It returns a boolean type (true | false)
0
1020
posted 15 years ago by mardix
Paste this code in your HTML to display the current year. This script is commonly used in the © copyright's current year.
4
924
posted 16 years ago by variantstudios
This takes a very readable date, such as "Fri, 4 Dec 2008 15:13:00 +0000", and outputs it as a relative date (such as "1 hour ago").
1
1001
posted 16 years ago by bjarkebech
NOT MY CODE. I was looking for a good code that would validate the date in JavaScript and I found this function. I thought it was worth keeping so I decided to post it on here as opposed to clutter my bookmarks with one more link.
Once again I take...
0
895
posted 16 years ago by ckester
i found this snippet here on snipplr (see the link up above), and really liked it. it came up with a validation error under XHTML 1.0 Strict so i changed it to what you see in the bottom.....
1
823
posted 16 years ago by pufftenticle
This routine is loosely based on elightbo's "Calculate Business Days" snippet in ASP, with some process & logic modifications (most notably accounting for situations when both dates fall on a weekend) and a translation to JavaScript.
0
4828
posted 17 years ago by Bluebeard
You can use this script to always keep the copyright notice on the footer of your website current. For example, instead of having to update the year at the beginning of each year, this script will display current year. I'm sure there's an easier way...
2
987
posted 18 years ago by jonhenshaw