Changing Bookmarks Based on DateDecember 15, 2012
I use a local wiki powered by Gollum to keep myself organized. I use the following file structure:
At first, I had a bookmark that linked to a page that had an index of all the pages in the /Developer/Notes/ section of the wiki. But that took two steps to get to a day’s page. I would have to click the bookmark to the index, and then choose the specific day in the index. To shorten the process, I created the following TextExpander snippet that would automatically enter the URL for the current day’s page.
Now it’s just one step: one click. Note that 1900 must be added to
getYear() returns the number of years since 1900. 1 must be added to
getMonth() starts at 0, where 0 is January.
getDate() works as expected.