Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3594152
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T19:40:27+00:00 2026-05-18T19:40:27+00:00

In this plugin: http://dansnetwork.com/2010/03/27/content-expirator-jquery-content-expiration-plugin/ He is comparing the expire date d to the current

  • 0

In this plugin:

http://dansnetwork.com/2010/03/27/content-expirator-jquery-content-expiration-plugin/

He is comparing the expire date d to the current date today, but I don’t understand how today knows what today’s date is just from new Date():

(function($){
$.contentExpirator = function(prfx){
    var pfix = prfx || 'exp';
    $("[class|="+pfix+"]").each(function(){
        var eString = $(this).attr('class').split(' ')[0];
        var dString = eString.split('-');
        var d = new Date(dString[1],dString[2].toString()-1,dString[3]);
        var today = new Date();
        if(d < today){
            $(this).css('display','none');
        }
    });
}
})(jQuery);

The code works fine, I’m just asking out of curiosity for the future.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T19:40:28+00:00Added an answer on May 18, 2026 at 7:40 pm

    The default value for new Date() is the current date. From the MDC docs:

    If you supply no arguments, the constructor creates a Date object for today’s date and time according to local time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using this great plugin: http://www.sanisoft.com/blog/2009/06/22/jquery-auto-correct-plugin/ But it's not working with 1.6.2 or greater...
Take a look at this snazy plugin: http://remysharp.com/2007/12/28/jquery-tag-suggestion/ ** it's real small Source: http://remysharp.com/downloads/tag.js
I'm using this JQuery autocomplete plugin http://www.devbridge.com/projects/autocomplete/jquery/ in my project. I followed this tutorial
I utilize this plugin for slider site > http://basic-slider.com/documentation/ script > https://github.com/jcobb/basic-jquery-slider/blob/807132214df170e1726e05f272fb75649687f268/js/basic-jquery-slider.js the basic
I'm using this plugin for jquery called resize-crop: http://code.google.com/p/resize-crop/ The problem with this is
I am using this plugin: http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/index.html (dropdown style) And it is working well but
Some newbie questions. First, I would love to get this plugin: http://archive.plugins.jquery.com/project/getAttributes but I
I'm looking for this plugin: http://plugins.jquery.com/node/7411 It seems like it's not available for download
I am using this plugin: http://plugins.jquery.com/project/history on this page: http://www.crtaci.info/index.php?autocom=majice I dont know why
I'm using this plugin: http://cssglobe.com/post/5780/easy-slider-17-numeric-navigation-jquery-slider Demo: http://cssglobe.com/lab/easyslider1.7/02.html Maybe somewhere in here can be altered?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.