@@ -5543,7 +5543,7 @@ d_lite_sec(VALUE self)
5543
5543
*
5544
5544
* DateTime.new(2001, 2, 3, 4, 5, 6.5).sec_fraction # => (1/2)
5545
5545
*
5546
- * Date. second_fraction is an alias for Date#sec_fraction.
5546
+ * Date# second_fraction is an alias for Date#sec_fraction.
5547
5547
*/
5548
5548
static VALUE
5549
5549
d_lite_sec_fraction (VALUE self )
@@ -5584,12 +5584,14 @@ d_lite_zone(VALUE self)
5584
5584
5585
5585
/*
5586
5586
* call-seq:
5587
- * d.julian? -> bool
5587
+ * d.julian? -> true or false
5588
5588
*
5589
- * Returns true if the date is before the day of calendar reform.
5589
+ * Returns +true+ if the date is before the date of calendar reform,
5590
+ * +false+ otherwise:
5591
+ *
5592
+ * (Date.new(1582, 10, 15) - 1).julian? # => true
5593
+ * Date.new(1582, 10, 15).julian? # => false
5590
5594
*
5591
- * Date.new(1582,10,15).julian? #=> false
5592
- * (Date.new(1582,10,15) - 1).julian? #=> true
5593
5595
*/
5594
5596
static VALUE
5595
5597
d_lite_julian_p (VALUE self )
@@ -5600,12 +5602,14 @@ d_lite_julian_p(VALUE self)
5600
5602
5601
5603
/*
5602
5604
* call-seq:
5603
- * d. gregorian? -> bool
5605
+ * gregorian? -> true or false
5604
5606
*
5605
- * Returns true if the date is on or after the day of calendar reform.
5607
+ * Returns +true+ if the date is on or after
5608
+ * the date of calendar reform, +false+ otherwise:
5609
+ *
5610
+ * Date.new(1582, 10, 15).gregorian? # => true
5611
+ * (Date.new(1582, 10, 15) - 1).gregorian? # => false
5606
5612
*
5607
- * Date.new(1582,10,15).gregorian? #=> true
5608
- * (Date.new(1582,10,15) - 1).gregorian? #=> false
5609
5613
*/
5610
5614
static VALUE
5611
5615
d_lite_gregorian_p (VALUE self )
@@ -5616,12 +5620,13 @@ d_lite_gregorian_p(VALUE self)
5616
5620
5617
5621
/*
5618
5622
* call-seq:
5619
- * d.leap? -> bool
5623
+ * leap? -> true or false
5624
+ *
5625
+ * Returns +true+ if the year is a leap year, +false+ otherwise:
5620
5626
*
5621
- * Returns true if the year is a leap year.
5627
+ * Date.new(2000).leap? # => true
5628
+ * Date.new(2001).leap? # => false
5622
5629
*
5623
- * Date.new(2000).leap? #=> true
5624
- * Date.new(2001).leap? #=> false
5625
5630
*/
5626
5631
static VALUE
5627
5632
d_lite_leap_p (VALUE self )
@@ -5640,12 +5645,25 @@ d_lite_leap_p(VALUE self)
5640
5645
5641
5646
/*
5642
5647
* call-seq:
5643
- * d.start -> float
5648
+ * start -> float
5649
+ *
5650
+ * Returns the Julian start date for calendar reform;
5651
+ * if not an infinity, the returned value is suitable
5652
+ * for passing to Date#jd:
5653
+ *
5654
+ * d = Date.new(2001, 2, 3, Date::ITALY)
5655
+ * s = d.start # => 2299161.0
5656
+ * Date.jd(s).to_s # => "1582-10-15"
5657
+ *
5658
+ * d = Date.new(2001, 2, 3, Date::ENGLAND)
5659
+ * s = d.start # => 2361222.0
5660
+ * Date.jd(s).to_s # => "1752-09-14"
5644
5661
*
5645
- * Returns the Julian day number denoting the day of calendar reform.
5662
+ * Date.new(2001, 2, 3, Date::GREGORIAN).start # => -Infinity
5663
+ * Date.new(2001, 2, 3, Date::JULIAN).start # => Infinity
5664
+ *
5665
+ * See argument {start}[rdoc-ref:Date@Argument+start].
5646
5666
*
5647
- * Date.new(2001,2,3).start #=> 2299161.0
5648
- * Date.new(2001,2,3,Date::GREGORIAN).start #=> -Infinity
5649
5667
*/
5650
5668
static VALUE
5651
5669
d_lite_start (VALUE self )
@@ -5710,12 +5728,17 @@ dup_obj_with_new_start(VALUE obj, double sg)
5710
5728
5711
5729
/*
5712
5730
* call-seq:
5713
- * d.new_start([start=Date::ITALY]) -> date
5731
+ * new_start(start = Date::ITALY]) -> new_date
5732
+ *
5733
+ * Returns a copy of +self+ with the given +start+ value:
5714
5734
*
5715
- * Duplicates self and resets its day of calendar reform.
5735
+ * d0 = Date.new(2000, 2, 3)
5736
+ * d0.julian? # => false
5737
+ * d1 = d0.new_start(Date::JULIAN)
5738
+ * d1.julian? # => true
5739
+ *
5740
+ * See argument {start}[rdoc-ref:Date@Argument+start].
5716
5741
*
5717
- * d = Date.new(1582,10,15)
5718
- * d.new_start(Date::JULIAN) #=> #<Date: 1582-10-05 ...>
5719
5742
*/
5720
5743
static VALUE
5721
5744
d_lite_new_start (int argc , VALUE * argv , VALUE self )
@@ -5734,9 +5757,10 @@ d_lite_new_start(int argc, VALUE *argv, VALUE self)
5734
5757
5735
5758
/*
5736
5759
* call-seq:
5737
- * d.italy -> date
5760
+ * italy -> new_date
5761
+ *
5762
+ * Equivalent to Date#new_start with argument Date::ITALY.
5738
5763
*
5739
- * This method is equivalent to new_start(Date::ITALY).
5740
5764
*/
5741
5765
static VALUE
5742
5766
d_lite_italy (VALUE self )
@@ -5746,9 +5770,9 @@ d_lite_italy(VALUE self)
5746
5770
5747
5771
/*
5748
5772
* call-seq:
5749
- * d. england -> date
5773
+ * england -> new_date
5750
5774
*
5751
- * This method is equivalent to new_start( Date::ENGLAND) .
5775
+ * Equivalent to Date#new_start with argument Date::ENGLAND.
5752
5776
*/
5753
5777
static VALUE
5754
5778
d_lite_england (VALUE self )
@@ -5758,9 +5782,9 @@ d_lite_england(VALUE self)
5758
5782
5759
5783
/*
5760
5784
* call-seq:
5761
- * d. julian -> date
5785
+ * julian -> new_date
5762
5786
*
5763
- * This method is equivalent to new_start( Date::JULIAN) .
5787
+ * Equivalent to Date#new_start with argument Date::JULIAN.
5764
5788
*/
5765
5789
static VALUE
5766
5790
d_lite_julian (VALUE self )
@@ -5770,9 +5794,9 @@ d_lite_julian(VALUE self)
5770
5794
5771
5795
/*
5772
5796
* call-seq:
5773
- * d. gregorian -> date
5797
+ * gregorian -> new_date
5774
5798
*
5775
- * This method is equivalent to new_start( Date::GREGORIAN) .
5799
+ * Equivalent to Date#new_start with argument Date::GREGORIAN.
5776
5800
*/
5777
5801
static VALUE
5778
5802
d_lite_gregorian (VALUE self )
@@ -6253,9 +6277,9 @@ d_lite_minus(VALUE self, VALUE other)
6253
6277
6254
6278
/*
6255
6279
* call-seq:
6256
- * d. next_day([n=1]) -> date
6280
+ * next_day(n = 1) -> new_date
6257
6281
*
6258
- * This method is equivalent to d + n .
6282
+ * Equivalent to Date#+ with argument +n+ .
6259
6283
*/
6260
6284
static VALUE
6261
6285
d_lite_next_day (int argc , VALUE * argv , VALUE self )
@@ -6270,9 +6294,9 @@ d_lite_next_day(int argc, VALUE *argv, VALUE self)
6270
6294
6271
6295
/*
6272
6296
* call-seq:
6273
- * d. prev_day([n=1]) -> date
6297
+ * prev_day(n = 1) -> new_date
6274
6298
*
6275
- * This method is equivalent to d - n .
6299
+ * Equivalent to Date#- with argument +n+ .
6276
6300
*/
6277
6301
static VALUE
6278
6302
d_lite_prev_day (int argc , VALUE * argv , VALUE self )
0 commit comments