home_run 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/CHANGELOG +3 -0
  2. data/LICENSE +19 -0
  3. data/README.rdoc +314 -0
  4. data/Rakefile +140 -0
  5. data/bench/cpu_bench.rb +279 -0
  6. data/bench/dt_garbage_bench.rb +11 -0
  7. data/bench/dt_mem_bench.rb +14 -0
  8. data/bench/garbage_bench.rb +11 -0
  9. data/bench/mem_bench.rb +14 -0
  10. data/bin/home_run +87 -0
  11. data/default.mspec +12 -0
  12. data/ext/date/format.rb +842 -0
  13. data/ext/date.rb +7 -0
  14. data/ext/date_ext.c +4548 -0
  15. data/ext/date_parser.c +367 -0
  16. data/ext/date_parser.rl +134 -0
  17. data/ext/datetime.c +2804 -0
  18. data/ext/extconf.rb +6 -0
  19. data/spec/date/accessor_spec.rb +176 -0
  20. data/spec/date/add_month_spec.rb +26 -0
  21. data/spec/date/add_spec.rb +23 -0
  22. data/spec/date/boat_spec.rb +38 -0
  23. data/spec/date/civil_spec.rb +147 -0
  24. data/spec/date/commercial_spec.rb +153 -0
  25. data/spec/date/constants_spec.rb +44 -0
  26. data/spec/date/conversions_spec.rb +246 -0
  27. data/spec/date/day_spec.rb +73 -0
  28. data/spec/date/downto_spec.rb +17 -0
  29. data/spec/date/eql_spec.rb +16 -0
  30. data/spec/date/format_spec.rb +52 -0
  31. data/spec/date/gregorian_spec.rb +52 -0
  32. data/spec/date/hash_spec.rb +11 -0
  33. data/spec/date/julian_spec.rb +129 -0
  34. data/spec/date/leap_spec.rb +19 -0
  35. data/spec/date/minus_month_spec.rb +25 -0
  36. data/spec/date/minus_spec.rb +51 -0
  37. data/spec/date/next_prev_spec.rb +108 -0
  38. data/spec/date/ordinal_spec.rb +83 -0
  39. data/spec/date/parse_spec.rb +442 -0
  40. data/spec/date/parsing_spec.rb +77 -0
  41. data/spec/date/relationship_spec.rb +28 -0
  42. data/spec/date/step_spec.rb +109 -0
  43. data/spec/date/strftime_spec.rb +223 -0
  44. data/spec/date/strptime_spec.rb +201 -0
  45. data/spec/date/succ_spec.rb +20 -0
  46. data/spec/date/today_spec.rb +15 -0
  47. data/spec/date/upto_spec.rb +17 -0
  48. data/spec/datetime/accessor_spec.rb +218 -0
  49. data/spec/datetime/add_month_spec.rb +26 -0
  50. data/spec/datetime/add_spec.rb +36 -0
  51. data/spec/datetime/boat_spec.rb +43 -0
  52. data/spec/datetime/constructor_spec.rb +142 -0
  53. data/spec/datetime/conversions_spec.rb +54 -0
  54. data/spec/datetime/day_spec.rb +73 -0
  55. data/spec/datetime/downto_spec.rb +39 -0
  56. data/spec/datetime/eql_spec.rb +17 -0
  57. data/spec/datetime/format_spec.rb +59 -0
  58. data/spec/datetime/hash_spec.rb +11 -0
  59. data/spec/datetime/leap_spec.rb +19 -0
  60. data/spec/datetime/minus_month_spec.rb +25 -0
  61. data/spec/datetime/minus_spec.rb +77 -0
  62. data/spec/datetime/next_prev_spec.rb +138 -0
  63. data/spec/datetime/now_spec.rb +18 -0
  64. data/spec/datetime/parse_spec.rb +390 -0
  65. data/spec/datetime/parsing_spec.rb +77 -0
  66. data/spec/datetime/relationship_spec.rb +28 -0
  67. data/spec/datetime/step_spec.rb +155 -0
  68. data/spec/datetime/strftime_spec.rb +118 -0
  69. data/spec/datetime/strptime_spec.rb +117 -0
  70. data/spec/datetime/succ_spec.rb +24 -0
  71. data/spec/datetime/upto_spec.rb +39 -0
  72. data/spec/spec_helper.rb +59 -0
  73. metadata +138 -0
data/ext/date.rb ADDED
@@ -0,0 +1,7 @@
1
+ begin
2
+ require "date_ext"
3
+ rescue LoadError
4
+ raise unless RUBY_PLATFORM =~ /win|w32/
5
+ require "#{RUBY_VERSION[0...3]}/date_ext"
6
+ end
7
+ require "date/format" unless defined?(Date::Format)