<commit_before>class Time
  
  # Helper method for backwards compatibility with ActiveSupport.
  def days_into_week
    defined?(DAYS_INTO_WEEK) ? DAYS_INTO_WEEK : { :monday => 0, :tuesday => 1, :wednesday => 2, :thursday => 3, :friday => 4, :saturday => 5, :sunday => 6 }
  end
  
  # Helper method for backwards compatibility with ActiveSupport.
  def common_year_days_in_month
    defined?(COMMON_YEAR_DAYS_IN_MONTH) ? COMMON_YEAR_DAYS_IN_MONTH : [nil, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
  end
  
  # Returns a new Time representing the start of the unit specified (second by default).
  def floor(unit = :sec)
    self.send("beginning_of_#{unit}")
  end
  alias :beginning_of :floor
  alias :at_beginning_of :floor
  
  # Returns a new Time representing the start of the next unit specified (second by default).
  def ceil(unit = :sec)
    self.send("next_#{unit}").send("beginning_of_#{unit}")
  end
  alias :beginning_of_next :ceil
  alias :at_beginning_of_next :ceil
  
  def round(unit = :sec)
    next_unit = self.ceil(unit)
    this_unit = self.floor(unit)
    (self - this_unit) < (next_unit - self) ? this_unit : next_unit
  end
  alias :beginning_of_closest :round
  
  # Short-hand for seconds_ago(1).
  def prev_second
    ago(1)
  end
  alias :prev_sec :prev_second
  
  # Short-hand for seconds_since(1).
  def next_second
    since(1)
  end
  alias :next_sec :next_second
  
  # Short-hand for minutes_ago(1).
  def prev_minute
    minutes_ago(1)
  end
  alias :prev_min :prev_minute<commit_msg>added description to Time#round<commit_after>class Time
  
  # Helper method for backwards compatibility with ActiveSupport.
  def days_into_week
    defined?(DAYS_INTO_WEEK) ? DAYS_INTO_WEEK : { :monday => 0, :tuesday => 1, :wednesday => 2, :thursday => 3, :friday => 4, :saturday => 5, :sunday => 6 }
  end
  
  # Helper method for backwards compatibility with ActiveSupport.
  def common_year_days_in_month
    defined?(COMMON_YEAR_DAYS_IN_MONTH) ? COMMON_YEAR_DAYS_IN_MONTH : [nil, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
  end
  
  # Returns a new Time representing the start of the unit specified (second by default).
  def floor(unit = :sec)
    self.send("beginning_of_#{unit}")
  end
  alias :beginning_of :floor
  alias :at_beginning_of :floor
  
  # Returns a new Time representing the start of the next unit specified (second by default).
  def ceil(unit = :sec)
    self.send("next_#{unit}").send("beginning_of_#{unit}")
  end
  alias :beginning_of_next :ceil
  alias :at_beginning_of_next :ceil
  
  # Returns a new Time representing the start of the current or next unit specified (second by default) depending which is closest
  def round(unit = :sec)
    next_unit = self.ceil(unit)
    this_unit = self.floor(unit)
    (self - this_unit) < (next_unit - self) ? this_unit : next_unit
  end
  alias :beginning_of_closest :round
  
  # Short-hand for seconds_ago(1).
  def prev_second
    ago(1)
  end
  alias :prev_sec :prev_second
  
  # Short-hand for seconds_since(1).
  def next_second
    since(1)
  end
  alias :next_sec :next_second
  
  # Short-hand for minutes_ago(1).
  def prev_minute
    minutes_ago(1)
  end
  alias :prev_min :prev_minute
{'fraction_non_alphanumeric': 0.0999687597625742, 'fraction_numerical': 0.023117775695095284, 'mean_word_length': 3.750741839762611, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3177489', 'n_tokens_mistral': 1198, 'n_tokens_neox': 1139, 'n_words': 325}