datemaker

datemaker
 点击下载

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

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

 

转载请注明:代码家园 » datemaker

评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)