What's new? | Help | Directory | Sign in
Google
datemaker
jQuery plug to create Date objects
  
  
    
Code License: MIT License
Labels: jQuery, Date, Javascript, cookie
Show all Featured Downloads:
jquery.datemaker-0.1.1.js
Join project
Project owners:
  doug.sparling

jquery.datamaker.js provides an easy way to create Javascript Date objects using simple time interval indicators. Use datamaker to create Data objects to use with jQuery cookie plugin.

Time interval indicators are like those in Perl CGI::Cookie: '+1M,' '-10d,' etc., and Rails ActiveSupport-like time indicators: '3.days.ago.' A few named time indicators: 'midnight' and 'now.' Note that '3.days.ago' is a string, not a method on an integer.

Integrates with jQuery cookie plugin

$.cookie('cookie_name', 'cookie_value', { expires: $.datemaker('+1h') });