Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Nov 11, 2013
  1. @sikachu

    Change syntax format for example returned values

    sikachu authored
    According to our guideline, we leave 1 space between `#` and `=>`, so we
    want `# =>` instead of `#=>`.
    
    Thanks to @fxn for the suggestion.
    
    [ci skip]
Commits on May 2, 2013
  1. @vipulnsward
Commits on Apr 23, 2013
  1. @pixeltrix

    Adjust for daylight savings in String#to_time

    pixeltrix authored
    The changes in b79adc4 had a bug where if the time in the String
    was in standard time but the current time was in daylight savings then
    the calculated adjustment was off by an hour.
    
    This commit fixes this and adds extra tests for the following:
    
    * time in string is standard time, current time is standard time
    * time in string is standard time, current time is daylight savings
    * time in string is daylight savings, current time is standard time
    * time in string is daylight savings, current time is daylight savings
    
    Fixes #10306.
Commits on Jan 21, 2013
  1. @pixeltrix

    Use `DateTime.parse` inside `String#to_datetime`

    pixeltrix authored
    Use the standard library's `DateTime.parse` because it's marginally
    faster and supports partial date/time strings.
    
    Benchmark:
           user     system      total        real
    old  3.980000   0.000000   3.980000 (  3.987606)
    new  3.640000   0.010000   3.650000 (  3.641342)
  2. @pixeltrix

    Standardise the return value of `to_time`

    pixeltrix authored
    This commit standardises the return value of `to_time` to an instance
    of `Time` in the local system timezone, matching the Ruby core and
    standard library behavior.
    
    The default form for `String#to_time` has been changed from :utc to
    :local but research seems to suggest the latter is the more common form.
    
    Also fix an edge condition with `String#to_time` where the string has
    a timezone offset in it and the mode is :local. e.g:
    
      # Before:
      >> "2000-01-01 00:00:00 -0500".to_time(:local)
      => 2000-01-01 05:00:00 -0500
    
      # After:
      >> "2000-01-01 00:00:00 -0500".to_time(:local)
      => 2000-01-01 00:00:00 -0500
    
    Closes #2453
Commits on Jan 4, 2013
  1. @kwstannard

    Better error message for String#to_date

    kwstannard authored
    I did this because to_date gives a very unhelpful error message if you
    do not pass in a correct date. In the process I think this cleans up the
     code nicely and even better it tends to be slightly faster than the
     current implementation.
    
    Benchmark
    https://gist.github.com/4440875
Commits on Dec 11, 2012
  1. @pixeltrix

    Deprecate obsolete Time to DateTime fallback methods

    pixeltrix authored
    The Time.time_with_datetime_fallback, Time.utc_time and Time.local_time
    methods were added to handle the limitations of Ruby's native Time
    implementation. Those limitations no longer apply so we are deprecating
    them in 4.0 and they will be removed in 4.1.
Commits on Sep 24, 2012
  1. @sheerun
Commits on May 12, 2012
  1. @frodsan

    removing trailing spaces

    frodsan authored
Commits on May 11, 2012
  1. @frodsan
  2. @frodsan

    added docs to String#to_date

    frodsan authored
Commits on Apr 28, 2012
  1. @gazay

    AS core_ext refactoring

    gazay authored
Commits on Dec 22, 2011
  1. @lest

    no more need to make Time#to_date and Time#to_datetime public

    lest authored
    they are public in actual 1.9 ruby version (tested at least in 1.9.2-p180)
Commits on Dec 21, 2011
  1. @lest
Commits on Jul 23, 2011
  1. @fxn
Commits on Jun 3, 2011
  1. @natemueller
Commits on Jun 27, 2010
  1. @spastorino @fxn

    Implemented getbyte as an aliased method and RDoc added

    spastorino authored fxn committed
    Signed-off-by: Xavier Noria <fxn@hashref.com>
  2. @spastorino @josevalim

    Makes more sense to ask about method_defined?

    spastorino authored josevalim committed
    Signed-off-by: José Valim <jose.valim@gmail.com>
  3. @spastorino @josevalim

    Added getbyte as a core_ext to Ruby < 1.9

    spastorino authored josevalim committed
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Jun 26, 2010
  1. @spastorino @josevalim

    Move constantize from conversions to inflections.

    spastorino authored josevalim committed
    This removes ActiveModel dependency on TZInfo.
    
    [#4979 state:committed]
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Jun 6, 2010
  1. @jeremy
Commits on Apr 21, 2010
  1. @hassox @wycats
Commits on Apr 19, 2010
  1. @fxn

    much complete rdoc for String#ord

    fxn authored
  2. @fxn

    revises the rdoc of String#ord

    fxn authored
Commits on Feb 19, 2010
  1. @spastorino

    require publicize_conversion_method to ensure to_date and to_datetime…

    spastorino authored Yehuda Katz committed
    … became public before redefining them (avoid warnings)
Commits on Jun 8, 2009
  1. @Fryguy @gbuesing

    String #to_time and #to_datetime: handle fractional seconds [#864 sta…

    Fryguy authored gbuesing committed
    …te:resolved]
Commits on Apr 30, 2009
  1. @jeremy
Commits on Apr 23, 2009
  1. @jeremy
Commits on Mar 29, 2009
  1. @jeremy

    Convert String conversions, filters, starts/ends_with, and multibyte …

    jeremy authored
    …extension modules to class reopen
Commits on Dec 27, 2007
  1. @jeremy

    Ruby 1.9 compat: don't use obsolete ParseDate

    jeremy authored
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8490 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Dec 15, 2007
  1. @jeremy

    Ruby 1.9 compat: 'a'.ord == 'a'[0]

    jeremy authored
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8403 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Nov 24, 2007
  1. @gbuesing

    Honor Ruby's default calendar reform setting when creating DateTime o…

    gbuesing authored
    …bjects via ActiveRecord's Time -> DateTime overflow, Time#time_with_datetime_fallback, Time#to_datetime, Date#to_datetime and String#to_datetime. Closes #10201
    
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Jun 4, 2007
  1. @jeremy
Commits on Mar 2, 2005
  1. @dhh
Something went wrong with that request. Please try again.