• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/ruby-106/ruby/test/date/

Lines Matching refs:Date

7     [Date.new,
8 Date.civil,
15 [Date.new(2001),
16 Date.civil(2001),
23 d = Date.new(2001, 2, 3)
25 d = Date.new(2001, 2, Rational('3.5'))
27 d = Date.new(2001,2, 3, Date::JULIAN)
29 d = Date.new(2001,2, 3, Date::GREGORIAN)
32 d = Date.new(2001,-12, -31)
34 d = Date.new(2001,-12, -31, Date::JULIAN)
36 d = Date.new(2001,-12, -31, Date::GREGORIAN)
60 d = DateTime.new(2001, -12, -31, -4, -5, -6, '-09:00', Date::JULIAN)
63 d = DateTime.new(2001, -12, -31, -4, -5, -6, '-09:00', Date::GREGORIAN)
69 d = Date.jd
71 d = Date.jd(0)
73 d = Date.jd(2451944)
100 d = Date.ordinal
102 d = Date.ordinal(-4712, 1)
105 d = Date.ordinal(2001, 2)
107 d = Date.ordinal(2001, 2, Date::JULIAN)
109 d = Date.ordinal(2001, 2, Date::GREGORIAN)
112 d = Date.ordinal(2001, -2, Date::JULIAN)
114 d = Date.ordinal(2001, -2, Date::GREGORIAN)
141 d = Date.commercial
143 d = Date.commercial(-4712, 1, 1)
146 d = Date.commercial(2001, 2, 3)
148 d = Date.commercial(2001, 2, 3, Date::JULIAN)
150 d = Date.commercial(2001, 2, 3, Date::GREGORIAN)
153 d = Date.commercial(2001, -2, -3)
155 d = Date.commercial(2001, -2, -3, Date::JULIAN)
157 d = Date.commercial(2001, -2, -3, Date::GREGORIAN)
184 d = Date.jd(2451944.0)
186 d = Date.jd(Rational(2451944))
188 d = Date.jd(2451944.5)
190 d = Date.jd(Rational('2451944.5'))
193 d = Date.civil(2001, 2, 3.0)
195 d = Date.civil(2001, 2, Rational(3))
197 d = Date.civil(2001, 2, 3.5)
199 d = Date.civil(2001, 2, Rational('3.5'))
202 d = Date.ordinal(2001, 2.0)
204 d = Date.ordinal(2001, Rational(2))
207 d = Date.commercial(2001, 2, 3.0)
209 d = Date.commercial(2001, 2, Rational(3))
268 d = Date.new(2001, 2, 3)
275 d = Date.new(2001, 2, 3)
284 d = Date.new(2001, 2, 3)
292 Date.today.strftime('%100000z')
295 Date.new(1 << 10000).strftime('%Y')
297 assert_equal('-3786825600', Date.new(1850).strftime('%s'))
298 assert_equal('-3786825600000', Date.new(1850).strftime('%Q'))
302 assert_equal(-1, Date.new(2001,2,3) <=> Date.new(2001,2,4))
303 assert_equal(0, Date.new(2001,2,3) <=> Date.new(2001,2,3))
304 assert_equal(1, Date.new(2001,2,3) <=> Date.new(2001,2,2))
306 assert_equal(-1, Date.new(2001,2,3) <=> 2451944.0)
307 assert_equal(-1, Date.new(2001,2,3) <=> 2451944)
308 assert_equal(0, Date.new(2001,2,3) <=> 2451943.5)
309 assert_equal(1, Date.new(2001,2,3) <=> 2451943.0)
310 assert_equal(1, Date.new(2001,2,3) <=> 2451943)
312 assert_equal(-1, Date.new(2001,2,3) <=> Rational('4903888/2'))
313 assert_equal(0, Date.new(2001,2,3) <=> Rational('4903887/2'))
314 assert_equal(1, Date.new(2001,2,3) <=> Rational('4903886/2'))
318 assert_equal(false, Date.new(2001,2,3) === Date.new(2001,2,4))
319 assert_equal(true, Date.new(2001,2,3) === Date.new(2001,2,3))
320 assert_equal(false, Date.new(2001,2,3) === Date.new(2001,2,2))
322 assert_equal(true, Date.new(2001,2,3) === 2451944.0)
323 assert_equal(true, Date.new(2001,2,3) === 2451944)
324 assert_equal(false, Date.new(2001,2,3) === 2451943.5)
325 assert_equal(false, Date.new(2001,2,3) === 2451943.0)
326 assert_equal(false, Date.new(2001,2,3) === 2451943)
328 assert_equal(true, Date.new(2001,2,3) === Rational('4903888/2'))
329 assert_equal(false, Date.new(2001,2,3) === Rational('4903887/2'))
330 assert_equal(false, Date.new(2001,2,3) === Rational('4903886/2'))
335 d = Date.new(-5000,1,1)
340 d = Date.new(-5000,1,1,Date::JULIAN)
345 d = Date.new(-5000,1,1,Date::GREGORIAN)
350 d = Date.jd(-105192)
355 d = Date.jd(-105192,Date::JULIAN)
360 d = Date.jd(-105152,Date::GREGORIAN)
366 d = Date.new(-5_000_000,1,1)
371 d = Date.new(-5_000_000,1,1,Date::JULIAN)
376 d = Date.new(-5_000_000,1,1,Date::GREGORIAN)
381 d = Date.jd(-1824528942)
386 d = Date.jd(-1824528942,Date::JULIAN)
391 d = Date.jd(-1824491440,Date::GREGORIAN)
397 d = Date.new(5_000_000,1,1)
402 d = Date.new(5_000_000,1,1,Date::JULIAN)
407 d = Date.new(5_000_000,1,1,Date::GREGORIAN)
412 d = Date.jd(1827933560)
417 d = Date.jd(1827971058,Date::JULIAN)
422 d = Date.jd(1827933560,Date::GREGORIAN)
445 d = Date.jd(j, sg)
446 d2 = Date.new(d.year, d.mon, d.mday, sg)
461 period2_iter2(from, to, Date::GREGORIAN)
462 period2_iter2(from, to, Date::ITALY)
463 period2_iter2(from, to, Date::ENGLAND)
464 period2_iter2(from, to, Date::JULIAN)
478 assert_equal(0, Date.jd(0) <=> Date.civil(-4713, 11, 24, Date::GREGORIAN))
479 assert_equal(0, Date.jd(213447717) <=> Date.civil(579687, 11, 24))
480 assert_equal(0, Date.jd(-213447717) <=> Date.civil(-589113, 11, 24, Date::GREGORIAN))
482 assert_equal(0, Date.jd(0) <=> DateTime.civil(-4713, 11, 24, 0, 0, 0, 0, Date::GREGORIAN))
483 assert_equal(0, Date.jd(213447717) <=> DateTime.civil(579687, 11, 24))
484 assert_equal(0, Date.jd(-213447717) <=> DateTime.civil(-589113, 11, 24, 0, 0, 0, 0, Date::GREGORIAN))
486 assert(Date.jd(0) == Date.civil(-4713, 11, 24, Date::GREGORIAN))
487 assert(Date.jd(213447717) == Date.civil(579687, 11, 24))
488 assert(Date.jd(-213447717) == Date.civil(-589113, 11, 24, Date::GREGORIAN))
490 assert(Date.jd(0) == DateTime.civil(-4713, 11, 24, 0, 0, 0, 0, Date::GREGORIAN))
491 assert(Date.jd(213447717) == DateTime.civil(579687, 11, 24))
492 assert(Date.jd(-213447717) == DateTime.civil(-589113, 11, 24, 0, 0, 0, 0, Date::GREGORIAN))
494 assert(Date.jd(0) === Date.civil(-4713, 11, 24, Date::GREGORIAN))
495 assert(Date.jd(213447717) === Date.civil(579687, 11, 24))
496 assert(Date.jd(-213447717) === Date.civil(-589113, 11, 24, Date::GREGORIAN))
498 assert(Date.jd(0) === DateTime.civil(-4713, 11, 24, 12, 0, 0, 0, Date::GREGORIAN))
499 assert(Date.jd(213447717) === DateTime.civil(579687, 11, 24, 12))
500 assert(Date.jd(-213447717) === DateTime.civil(-589113, 11, 24, 12, 0, 0, 0, Date::GREGORIAN))
502 a = Date.jd(0)
503 b = Date.civil(-4713, 11, 24, Date::GREGORIAN)
506 a = Date.civil(-4712, 1, 1, Date::JULIAN)
507 b = Date.civil(-4713, 11, 24, Date::GREGORIAN)
511 a = Date.jd(0)
512 b = Date.civil(-4713, 11, 24, Date::GREGORIAN)
515 a = Date.civil(-4712, 1, 1, Date::JULIAN)
516 b = Date.civil(-4713, 11, 24, Date::GREGORIAN)
520 a = Date.jd(0)
521 b = Date.civil(-4713, 11, 24, Date::GREGORIAN)
524 a = Date.civil(-4712, 1, 1, Date::JULIAN)
525 b = Date.civil(-4713, 11, 24, Date::GREGORIAN)
535 assert_equal(Date::GREGORIAN, d.start)
543 assert_equal(Date::GREGORIAN, d.start)
551 assert_equal(Date::GREGORIAN, d.start)
557 assert_equal(Date::GREGORIAN, d.start)
565 assert_equal(Date::GREGORIAN, d.start)
571 assert_equal(Date::GREGORIAN, d.start)
575 h = Date._strptime('15:43+09:00', '%R%z')
577 h = Date._strptime('15:43+09:00'.taint, '%R%z')
580 h = Date._strptime('1;1/0', '%d')
582 h = Date._strptime('1;1/0'.taint, '%d')
585 h = Date._parse('15:43+09:00')
587 h = Date._parse('15:43+09:00'.taint)
590 s = Date.today.strftime('new 105')
592 s = Date.today.strftime('new 105'.taint)
594 s = Date.today.strftime("new \000 105".taint)
604 Date::MONTHNAMES.each do |s|
607 Date::DAYNAMES.each do |s|
610 Date::ABBR_MONTHNAMES.each do |s|
613 Date::ABBR_DAYNAMES.each do |s|
617 h = Date._strptime('15:43+09:00'.force_encoding('euc-jp'), '%R%z')
619 h = Date._strptime('15:43+09:00'.force_encoding('ascii-8bit'), '%R%z')
622 h = Date._strptime('1;1/0'.force_encoding('euc-jp'), '%d')
624 h = Date._strptime('1;1/0'.force_encoding('ascii-8bit'), '%d')
627 h = Date._parse('15:43+09:00'.force_encoding('euc-jp'))
629 h = Date._parse('15:43+09:00'.force_encoding('ascii-8bit'))
632 s = Date.today.strftime('new 105'.force_encoding('euc-jp'))
634 s = Date.today.strftime('new 105'.force_encoding('ascii-8bit'))
644 d = Date.new(2001,2,3)
647 assert_kind_of(Date, d2)
658 skip unless defined?(Date.test_all)
659 assert_equal(true, Date.test_all)