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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:33:01+00:00 2026-05-25T09:33:01+00:00

ruby-1.9.2-p290 :001 > require ‘date’ => true ruby-1.9.2-p290 :002 > date = ’01/23/2011’=> 01/23/2011

  • 0
ruby-1.9.2-p290 :001 > require 'date' => true 
ruby-1.9.2-p290 :002 > date = '01/23/2011'=> "01/23/2011" 
ruby-1.9.2-p290 :003 > Date.strptime(date, "%m/%d/%Y") => 
#<Date: 2011-01-23 (4911169/2,0,2299161)> 
ruby-1.9.2-p290 :004 > Date.mon
NoMethodError: undefined method `mon' for Date:Class
    from (irb):4
    from /Users/noahclark/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>'
ruby-1.9.2-p290 :005 > 

Why does it do this? I’ve looked in the documentation and .mon or .month is a valid method.

Thanks in advance.

  • 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-25T09:33:01+00:00Added an answer on May 25, 2026 at 9:33 am

    mon and month are valid methods of Date instances. You’re calling them on Date – that is, a class.

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

Sidebar

Related Questions

I get the following error: Loading development environment (Rails 3.1.0) ruby-1.9.2-p290 :001 > rails
Here is a strange problem. In irb, require 'openssl' return true. Went into subdir
While integrating backgroundrb-rails3 I get the following error, ~/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in `parse': couldn't parse YAML at
Ruby Settings From terminal % ruby -v ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux] =>
RVM is not working over SSH. At the command-line: leifg@host:~$ which ruby /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby Connected
I get this RVM error when I install rubygems. /Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.3/lib/yard.rb:38: [BUG] Bus Error ruby
Here are logs umair-2:game-minion umairejaz$ rails c /Users/umairejaz/.rvm/gems/ruby-1.9.2-p290@rails3/gems/railties-3.0.7/lib/rails/script_rails_loader.rb:11: warning: Insecure world writable dir /usr/local/bin
Ruby has two different exceptions mechanisms: Throw/Catch and Raise/Rescue. Why do we have two?
Ruby setters—whether created by (c)attr_accessor or manually—seem to be the only methods that need
Ruby's standard popen3 module does not work on Windows. Is there a maintained replacement

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.