Home & blog  /  Tag: date  /

Update to date calculator script

posted: 13 Mar '11 13:13 tags: Javascript, date, time, calculation

I've just updated my date calculation tool, which you might recall allows you to get the number of seconds, minutes, hours, days or weeks between two dates.

It now allows you to specify the string now for one of the data arguments, meaning calculation will be done from/until the present moment

Also new is the ability to return years and months as well as the above units, and you can now specify time - not just date - in the date arguments.

Not the most exciting script in the world, but quite a useful one.

Head over here to download, get usage info or view a demo.

post a comment

Calculate time between two dates

posted: 02 Jun '10 10:01 tags: Javascript, date, time, calculation

Just created this script for a job I'm doing. It allows you to return the seconds, minutes, hours, days or weeks between two passed dates. Later on I'll develop this script further so it takes into account time, not just dates, and can return only work or weekend days as required, rather than just all days.

Head over here to download, get usage info or view a demo.

post a comment

Calendar and date-picker

posted: 30 May '10 09:15 tags: Javascript, calendar, date, jQuery

Just posted a calendar/date-picker plugin I've been working on for some weeks. In short, it aims to be the most versatile and easy-to-integrate plugin of its kind, and it's the one I use on the right of this page.

It's just one file (including all styling - no separate CSS files), and you have full control over:

- what fields should wake up/hide the calendar on focus in/out, or should it always be visible?

- what dates are displayed (particular ones? Future only? Past only)

- what happens when a date is clicked (write the date to a text field? Pass it to a callback function? Assign it to a variable?)

...and much more.

Head over here to download, get usage info or view a demo.

post a comment