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

  • SEARCH
  • Home
  • 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 4339724
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:15:14+00:00 2026-05-21T11:15:14+00:00

Here is my problem. in c# i can do this using this: DateTime.Now.AddMonths(12); But

  • 0

Here is my problem.

in c# i can do this using this:

DateTime.Now.AddMonths(12);

But i don’t know how to do it in JavaScript/jQuery, any ideas ? i’m trying google it, but i only found Converts …. (any tip in how i can search this, will help me too)

Thanks in advance.

PS: I Found this: A couple of classes featuring the same utilities that .NET classes do. , but, can i only achieve this with one “plugin” ?

  • 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-21T11:15:15+00:00Added an answer on May 21, 2026 at 11:15 am
    var date = new Date();
    date.setMonth(date.getMonth() + 12);
    

    Obviously 12 is a bit of a silly example, since it’s a whole year…

    Oh, and if your new month doesn’t have enough days for the old day of month, that then wraps around too, so you have to be careful. For instance:

    var date = new Date();
    var day = date.getDate();
    date.setMonth(date.getMonth() + 1);
    if (date.getDate() != day) // day too big, month rolled over
      date.setDate(0); // Use last day of the month
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the problem I'm having, I've got a set of logs that can grow
Well here's my problem I have three tables; regions, countries, states. Countries can be
I'll try to explain my problem the best I can, here goes: I have
I've got a problem here with an MSI deployment that I'm working on (using
This is in reference to the question previously asked The problem here is, each
I don't really have a real world problem, yet, but I'm trying to learn
Just a small SVN problem here. I setup my own SVN server Setting up
I'm having a strange problem here... I have an ASP.NET 3.5 application that has
I'm having a bit of a problem here. We have 2 urls let me
I've got a Schroedinger's Cat type of problem here -- my program (actually the

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.