[Project_owners] Reading and Writing LastVisitDate from Bookmarks

Sudhakar Chandra thaths at openscroll.org
Wed May 5 10:53:25 EDT 2004


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)

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?


"You can't keep blaming yourself. Blame yourself once, and move on."
                          -- Homer J. Simpson
Slacker Without Borders                        http://openscroll.org/
Key fingerprint = 8A 84 2E 67 10 9A 64 03  24 38 B6 AB 1B 6E 8C E4

More information about the Project_owners mailing list