[Project_owners] Reading and Writing LastVisitDate from Bookmarks

HJ bugs4hj at netscape.net
Wed May 5 08:52:23 EDT 2004

Sudhakar Chandra <thaths at openscroll.org> wrote:

>I have a tree whose datasource is rdf:bookmarks.  I need to read and 
>write the LastVisitDate attribute of a bookmark.  I have two questions:
>1. When I read the LastVisitDate of a bookmark I get a string like 
>"05/01/04 16:53:12".  When I pass this on to JS's Date() constructor, 
>the Date object created is for the year 1904.  Currently I have to do 
>some kludgey stuff to correct for this.
>My code looks like so:
>lastVisited = 
>lastUpdatedAt = new Date(lastVisited)

Have you looked at the bookmarks manager? That doesn't seem to have that problem.

>Is there a way around this?
>2. I have the urn/uri (i.e. the bookmark ID) of one of the bookmarks 
>whose LastVisitDate I want to set.  I do no want to walk the entire 
>bookmarks rdf tree to find this one bookmark and set its LastVisitDate. 
>  Can someone give me a code snippet to set the LastVisitDate for one 
>known item?  Is there something in BookmarksUtils to help me do this?



Introducing the New Netscape Internet Service. 
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need. 

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

More information about the Project_owners mailing list