Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 26th, 2006, 03:24 PM
Registered User
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Determining date range with JS

It has been a while, so this is a noobie question...

I have two variables
dateToday and dateExpire

And, I need to determine if dateExpire is within a range (say 5-7 days) after dateToday.

My problem is the code to determine the "If dateExpire is 5-7 days after dateToday" part. I know this is easy, but I'm stuck. Uggggh.

I need to do the work in an "if" statement and return a "true" value if the criteria fit. This "true" will kick off a function to send the email.

Any ideas??

Old September 28th, 2006, 04:42 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post

take a look at http://www.w3schools.com/js/js_obj_date.asp which has an example on date comparison which is almost exactly what you need.

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find a date range between another date rang tayvonne Access 2 August 3rd, 2006 09:50 AM
Determining a week from current date... flippyn5 PHP Databases 1 December 2nd, 2005 09:01 PM
Date Range Flipflop SQL Language 6 November 25th, 2005 08:36 AM
Help with Date Range PacMed Access 1 February 1st, 2005 12:30 PM
Determining page number of a range name santon198 Excel VBA 0 May 10th, 2004 01:20 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.