BlogMatrix
 

Converting epoch to date and vice versa

edit Tim Desjardins 2007-12-06 17:21 UTC add comment  ·  ·

I've been doing a lot of date related things in Java recently, and having an independent tool to generate sane test data is very handy.

Try it here: http://www.esqsoft.com/javascript_examples/date-to-epoch.htm 

Also includes free Javascript, nice.

Also check out thisother java script date library.

http://www.ajaxian.com/archives/mad-cool-date-library 

The original reference is good for near dates but seems to drift quite a bit for dates way in the future. The following link seems to do a very good job of date caclulations, plus it includes a number of rather unusual calendars and things like MS-Excel date serial numbers, very handy.

http://www.fourmilab.ch/documents/calendar/

Add a file to Windows Recent Documents Menu

edit Tim Desjardins 2005-12-29 03:44 UTC add comment  ·  ·

Like most things Microsoft there’s no orthogonal way to do the things that end up in the file system, in one way or the other, like Microsoft’s Windows most recently used Documents menu. You would think that to add a file to the menu you could simply drop a file or shortcut to the file into the directory (that mirrors the menu) and it would magically appear in the menu, you’d be wrong. So after much searching I found a solution, the catch, the call was only available in Visual Basic (as far as I could tell), and believe me I scoured MSDN and there were no MFC C or C++ libs that provided the call, only Visual Basic. I know there’s a way but I couldn’t find it. MS should really eat their own dog food. Anyhoo, I had my friend Werner whip up this little binary in Visual Basic.

It’s called AddDocuments.exe:

If you run AddDocuments.exe with no parameters it will empty your most recently used documents directory and therefore empty the menu.

You can run AddDocuments with a path to a file and the file will then be added the most recently used menu, short and simple. I run a script every 12 hours to add my most used documents to the menu.

AddDocuments.zip

This program is free to use at your own risk.