Susan Charkes is the Systems Librarian for Dechert Price & Rhoads in Philadelphia. Ms. Charkes practiced law in New York City for 7 years before becoming involved in the information professions. She has held positions in technology consulting and electronic publishing, as well as in corporate information services for Warner-Lambert Co. and other organizations. She received a BA in English from The University of Chicago, a JD from Columbia University and an MLS from Rutgers, the State University of New Jersey. Ms. Charkes is Director/Web Manager of the Philadelphia Chapter of Special Libraries Association.
Suppose you want to set up an Intranet link to a Westlaw database in order enable researchers to view the most recent documents published during a time period that is a “rolling window”. The period of time is fixed, but the start date varies depending on when the search is done. For instance, enable researchers to find only documents published within the last 30 days.
Lexis makes it easy to set up a window, using the “relativedate” search term. For example, “relativedate=previous_30_days”. Days, weeks, months and years all may used as parameters. Lexis Intranet Solutions builds this into the form for creating the Research Link.
But if you have worked with Westlaw’s Intranet Toolkit you know that there is no built-in Westlaw syntax to accomplish this. And Westlaw’s own technical support was stumped by the question.
Nonetheless, it can be done! I created some JavaScript code that implements the window by generating the beginning of the window (the relative date) as a date specific, when the link is clicked. Then this date is used as part of the search statement.
The example used here is a search of the NJADR database for notices, etc., published within the last 30/60/90 days. It is set up as a form, allowing the researcher to select a 30-, 60- or 90-day window.
The code is in two parts. The first part defines the necessary JavaScript functions, which you can incorporate into any page, with a little tweaking. Put this into the
section.
function GetThatDate (numberOfDays) {
today = new Date() ;
var msPerDays = (numberOfDays * 24 * 60 * 60 * 1000) ;
var msOnThatDate = (today.getTime() - msPerDays) ;
var thatDate = new Date (msOnThatDate) ;var mName = thatDate.getMonth() + 1;
var yName = thatDate.getYear();
var dayNr = [1]thatDate.getDate()<10) ? "0" : "")+ thatDate.getDate();var Year = yName + [2]yName < 100) ? 1900 : 0); if (Year < 999) {Year += 1900; } //fix 2/15/00 if((mName==1) |(mName==2) |(mName==3) |(mName==4) |(mName==5) |(mName==6) |(mName==7) |(mName==8) | (mName==9 … Continue reading
var Month = ("0" +mName)
else var Month = mName;// String to display the date.
var theDate =(+Month+ "%2F" +dayNr+ "%2F" +Year);
return theDate;
}In the section (here, set up to do the NJADR search in a 30-day window - you'll have to customize your search statement by editing the "begin link" and "complete link" strings):
// NJADR Search
// Begin linkdocument.write (' NJ-ADR recent notices :
New Jersey Dept. of Environmental Protection Notices published in past 30 days') ;Here is a page using this link.
There are probably ways to simplify and make this code even more portable. I'd welcome any suggestions. It has been successfully tested on both Netscape 4.7 and IE 5. If I get around to it before West does, I may put together a form that generates this code.
Many thanks to Genie Tyburski, who asked the question that got me started on this project, and whose testing and comments were essential to the finishing of it.