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 3499846
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:39:41+00:00 2026-05-18T12:39:41+00:00

I have a date of operation. I want create promissory notes which have got:

  • 0

I have a date of operation. I want create promissory notes which have got:

day=1
month= the next month of operation_date
year= automatic

Example :

operation_date = 15/11/2010 
promissory_note1_date = 1/12/2010
promissory_note2_date = 1/01/2011
promissory_note3_date = 1/02/2011
promissory_note4_date = 1/02/2011

if exist four promissory notes

How could I make it?

PD: Excuse me my syntax

  • 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-18T12:39:41+00:00Added an answer on May 18, 2026 at 12:39 pm

    You can do

    require "active_support"
    
    require "active_support/core_ext/date/calculations"
    # || require "active_support/all"
    
    Date.today.at_beginning_of_month
    #=> Wed, 01 Dec 2010
    
    Date.today.at_beginning_of_month.next_month
    #=> Sat, 01 Jan 2011
    
    Date.today.at_beginning_of_month.next_month.next_month
    #=> Tue, 01 Feb 2011
    

    And so on…

    References

    Rails guide 3.0 – 6.1.4 – ActiveSupport – How to Load Core Extensions
    Rails guide 3.0 – 6.1.4 – ActiveSupport – Extensions to date

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

Sidebar

Related Questions

I have some date and I want to get last x day before this
I have date 2012-04-02 10:01:00 am I want to show this date in with
I have date in sting object in following format. dd/mm/yyyy I want to change
I have a date in String format, mm/dd/yyyy I want to convert this to
I have 3 date range forms on my site. Essentially I want to hide
I have a date field in a query and I do want to get
i have extend a uiapplication for user interface,in which i will take a date
I have the following data i want to upload: (Pair) (Date) (Time) (Bid) (Ask)
I am having a long value which represents a date ,that is have converted
I'm having big problems doing operation with the date in Excel VBA. I have

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.