Skip to content

Instantly share code, notes, and snippets.

@structuralartistry
Created April 19, 2011 17:33
Show Gist options
  • Save structuralartistry/928958 to your computer and use it in GitHub Desktop.
Save structuralartistry/928958 to your computer and use it in GitHub Desktop.
DateTime from hell
ruby-1.8.7-p334 :002 > ruby-1.8.7-p334 :002 > DateTime.now.methods.sort
=> ["+", "-", "<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>", "__id__", "__send__", "_dump", "`", "acts_like?", "ajd", "amjd", "as_json", "asctime", "b64encode", "between?", "binding_n", "blank?", "breakpoint", "class", "class_eval", "clone", "copy_instance_variables_from", "ctime", "cwday", "cweek", "cwyear", "day", "day_fraction", "dclone", "debugger", "decode64", "decode_b", "display", "downto", "dup", "duplicable?", "enable_warnings", "encode64", "england", "enum_for", "eql?", "equal?", "extend", "freeze", "frozen?", "gem", "gregorian", "gregorian?", "hash", "hour", "html_safe?", "id", "inspect", "instance_eval", "instance_exec", "instance_of?", "instance_values", "instance_variable_defined?", "instance_variable_get", "instance_variable_names", "instance_variable_set", "instance_variables", "is_a?", "italy", "jd", "julian", "julian?", "kind_of?", "ld", "leap?", "load", "load_dependency", "mday", "method", "methods", "min", "mjd", "mon", "month", "new_offset", "new_start", "newof", "newsg", "next", "nil?", "ns?", "object_id", "of", "offset", "os?", "presence", "present?", "pretty_inspect", "pretty_print", "pretty_print_cycle", "pretty_print_inspect", "pretty_print_instance_variables", "private_methods", "protected_methods", "public_methods", "require", "require_association", "require_dependency", "require_library_or_gem", "require_or_load", "respond_to?", "returning", "sec", "sec_fraction", "send", "sg", "silence_stderr", "silence_stream", "silence_warnings", "singleton_class", "singleton_methods", "start", "step", "strftime", "succ", "suppress", "suppress_warnings", "taguri", "taguri=", "taint", "tainted?", "tap", "to_a", "to_enum", "to_json", "to_param", "to_query", "to_s", "to_yaml", "to_yaml_properties", "to_yaml_style", "try", "type", "unloadable", "untaint", "upto", "wday", "with_options", "with_warnings", "yday", "year", "zone"]
ruby-1.9.2-p136 :002 > DateTime.now.methods.sort
=> [:!, :!=, :!~, :+, :-, :<, :<<, :<=, :<=>, :==, :===, :=~, :>, :>=, :>>, :__delay__, :__id__, :__send__, :`, :acts_like?, :acts_like_date?, :acts_like_time?, :advance, :ago, :ajd, :amjd, :as_json, :asctime, :at_beginning_of_day, :at_beginning_of_month, :at_beginning_of_quarter, :at_beginning_of_week, :at_beginning_of_year, :at_end_of_month, :at_end_of_quarter, :at_end_of_week, :at_end_of_year, :at_midnight, :beginning_of_day, :beginning_of_month, :beginning_of_quarter, :beginning_of_week, :beginning_of_year, :between?, :blank?, :breakpoint, :change, :class, :class_eval, :clone, :compare_with_coercion, :compare_without_coercion, :copy_instance_variables_from, :ctime, :cwday, :cweek, :cwyear, :day, :day_fraction, :debugger, :default_inspect, :define_singleton_method, :delay, :describe, :display, :downto, :dup, :duplicable?, :enable_warnings, :end_of_day, :end_of_month, :end_of_quarter, :end_of_week, :end_of_year, :england, :enum_for, :eql?, :equal?, :extend, :formatted_offset, :freeze, :friday?, :frozen?, :future?, :gem, :getutc, :gregorian, :gregorian?, :hash, :hour, :html_safe?, :httpdate, :in, :in_time_zone, :initialize_clone, :initialize_dup, :inspect, :instance_eval, :instance_exec, :instance_of?, :instance_values, :instance_variable_defined?, :instance_variable_get, :instance_variable_names, :instance_variable_set, :instance_variables, :is_a?, :iso8601, :italy, :jd, :jisx0301, :julian, :julian?, :kind_of?, :ld, :leap?, :load, :load_dependency, :marshal_dump, :marshal_load, :mday, :method, :methods, :midnight, :min, :minus_with_duration, :minus_without_duration, :minute, :mjd, :mon, :monday, :monday?, :month, :months_ago, :months_since, :new_offset, :new_start, :next, :next_day, :next_month, :next_week, :next_year, :nil?, :object_id, :offset, :past?, :plus_with_duration, :plus_without_duration, :presence, :present?, :pretty_inspect, :pretty_print, :pretty_print_cycle, :pretty_print_inspect, :pretty_print_instance_variables, :prev_day, :prev_month, :prev_year, :private_methods, :protected_methods, :public_method, :public_methods, :public_send, :readable_inspect, :require, :require_association, :require_dependency, :require_library_or_gem, :require_or_load, :respond_to?, :respond_to_missing?, :returning, :rfc2822, :rfc3339, :rfc822, :saturday?, :sec, :sec_fraction, :second, :second_fraction, :seconds_since_midnight, :send, :send_at, :send_later, :share_as, :share_examples_for, :shared_examples_for, :should, :should_not, :silence_stderr, :silence_stream, :silence_warnings, :since, :singleton_class, :singleton_methods, :start, :step, :strftime, :succ, :sunday, :sunday?, :suppress, :suppress_warnings, :syck_to_yaml, :taguri, :taguri=, :taint, :tainted?, :tap, :thursday?, :to_date, :to_datetime, :to_default_s, :to_enum, :to_f, :to_formatted_s, :to_i, :to_json, :to_param, :to_query, :to_s, :to_time, :to_time_in_current_zone, :to_yaml, :to_yaml_properties, :to_yaml_style, :today?, :tomorrow, :trust, :try, :tuesday?, :unloadable, :untaint, :untrust, :untrusted?, :upto, :utc, :utc?, :utc_offset, :wday, :wednesday?, :with_options, :with_warnings, :xmlschema, :yday, :year, :years_ago, :years_since, :yesterday, :zone]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment