Hi Experts,
I'm trying to build a function [called nDate] that'll give the following output when supplied with an integer.
Todays date is 12th June 2008 (or 06/12/2008 as javascript seems to prefer)
nDate(0) returns "20080612" (today - thursday)
nDate(1) returns "20080611" (yesterday - wednesday)
nDate(2) returns "20080610" (tuesday
nDate(3) returns "20080609" (monday) [need to exclude saturday and sundays from calculation]
nDate(4) returns "20080606" (friday)
nDate(5) returns "20080605" (thursday)
I'll make a start, but any pointers would be highly appreciated!
Cheers
Jon
Start Free Trial