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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:29:12+00:00 2026-05-12T06:29:12+00:00

we are currently working on a rails project that uses i18n and we have

  • 0

we are currently working on a rails project that uses i18n and we have small problem with the dates:

# on my mac
"10.06.2008".to_date 
# produces => Tue, 10 Jun 2008

# on a friends mac and on the production server
"10.06.2008".to_date
# produces => ..., 06 Oct 2008

As you can see the dates aren’t right. We checked everything. The locale.yml (de.yml) is fine on both systems and the default_locale is set, too. The only difference between our systems is the ruby version. I’m running ruby 1.8.7 and he is running 1.8.6. Can this be the reason for this behaviour?

Any help would be appreciated.

  • 1 1 Answer
  • 1 View
  • 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-12T06:29:12+00:00Added an answer on May 12, 2026 at 6:29 am

    Yes, the Ruby version is the difference. String#to_date calls Date._parse internally, and that returns different results for Ruby 1.8.6 and 1.8.7.

    1.8.7:

    require "date"
    Date._parse("10.06.2008")
    #=> {:year=>2008, :mday=>10, :mon=>6}
    

    1.8.6:

    Date._parse("10.06.2008")
    #=> {:mday=>6, :mon=>10, :year=>2008}
    

    The change log for 1.8.7 mentions a change to the way dates are being parsed:

    Date.parse: ‘##.##.##’ (where each ‘#’ is a digit) is now taken as ‘YY.MM.DD’
    instead of ‘MM.DD.YY’. While the change may confuse you, you can
    always use Date.strptime() when you know what you are dealing
    with.

    Even though the four-digit version from your example is not explicitly mentioned, the same change probably causes the difference. The workaround would be to use Date.strptime.

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

Sidebar

Related Questions

Hello Ruby/Rails/Merb developers! Im currently working on a web project that will have a
Hi Currently i am working on a rails project . where i have to
Background Currently, I am working on a Rails application. I have different products that
Currently I am working on project like web analytic using rails 3.2.3 I have
I have just been informed that a Rails 3 project I've been working on
I'm currently working on a Rails project, and have found times where it's easiest
I'm currently working on a small project using Ruby On Rails 3.2 to create
I'm currently working on a project in Ruby on Rails (in Eclipse) and my
im working in a project writen in ruby on rails and im currently using
I have a remote that is the same, or similar, to the rails project

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.