stdlib/date/0/date.rbs in rbs-3.3.2 vs stdlib/date/0/date.rbs in rbs-3.4.0.pre.1
- old
+ new
@@ -90,12 +90,10 @@
# number of days in the month; when the argument is negative, counts backward
# from the end of the month.
#
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
#
- # Date.civil is an alias for Date.new.
- #
# Related: Date.jd.
#
def initialize: (?Integer year, ?Integer month, ?Integer mday, ?Integer start) -> void
include Comparable
@@ -190,12 +188,10 @@
# Date._rfc2822(s)
# # => {:wday=>6, :mday=>3, :mon=>2, :year=>2001, :hour=>0, :min=>0, :sec=>0, :zone=>"+0000", :offset=>0}
#
# See argument [limit](rdoc-ref:Date@Argument+limit).
#
- # Date._rfc822 is an alias for Date._rfc2822.
- #
# Related: Date.rfc2822 (returns a Date object).
#
def self._rfc2822: (String str) -> Hash[Symbol, Integer | String]
# <!--
@@ -228,12 +224,10 @@
# Date._rfc2822(s)
# # => {:wday=>6, :mday=>3, :mon=>2, :year=>2001, :hour=>0, :min=>0, :sec=>0, :zone=>"+0000", :offset=>0}
#
# See argument [limit](rdoc-ref:Date@Argument+limit).
#
- # Date._rfc822 is an alias for Date._rfc2822.
- #
# Related: Date.rfc2822 (returns a Date object).
#
def self._rfc822: (String str) -> Hash[Symbol, Integer | String]
# <!--
@@ -333,12 +327,10 @@
# otherwise:
#
# Date.gregorian_leap?(2000) # => true
# Date.gregorian_leap?(2001) # => false
#
- # Date.leap? is an alias for Date.gregorian_leap?.
- #
# Related: Date.julian_leap?.
#
def self.gregorian_leap?: (Integer year) -> bool
# <!--
@@ -463,12 +455,10 @@
# otherwise:
#
# Date.gregorian_leap?(2000) # => true
# Date.gregorian_leap?(2001) # => false
#
- # Date.leap? is an alias for Date.gregorian_leap?.
- #
# Related: Date.julian_leap?.
#
def self.leap?: (Integer year) -> bool
# <!--
@@ -531,11 +521,11 @@
# * Argument [limit](rdoc-ref:Date@Argument+limit).
#
#
# Related: Date._parse (returns a hash).
#
- def self.parse: (String str, ?boolish complete, ?Integer start) -> Date
+ def self.parse: (?String str, ?boolish complete, ?Integer start) -> Date
# <!--
# rdoc-file=ext/date/date_core.c
# - Date.rfc2822(string = 'Mon, 1 Jan -4712 00:00:00 +0000', start = Date::ITALY, limit: 128) -> date
# -->
@@ -551,12 +541,10 @@
#
# * Argument [start](rdoc-ref:calendars.rdoc@Argument+start).
# * Argument [limit](rdoc-ref:Date@Argument+limit).
#
#
- # Date.rfc822 is an alias for Date.rfc2822.
- #
# Related: Date._rfc2822 (returns a hash).
#
def self.rfc2822: (String str, ?Integer start) -> Date
# <!--
@@ -596,12 +584,10 @@
#
# * Argument [start](rdoc-ref:calendars.rdoc@Argument+start).
# * Argument [limit](rdoc-ref:Date@Argument+limit).
#
#
- # Date.rfc822 is an alias for Date.rfc2822.
- #
# Related: Date._rfc2822 (returns a hash).
#
def self.rfc822: (String str, ?Integer start) -> Date
# <!--
@@ -654,12 +640,10 @@
# Date.valid_date?(2001, 2, 29) # => false
# Date.valid_date?(2001, 2, -1) # => true
#
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
#
- # Date.valid_date? is an alias for Date.valid_civil?.
- #
# Related: Date.jd, Date.new.
#
def self.valid_civil?: (Integer year, Integer month, Integer mday, ?Integer start) -> bool
# <!--
@@ -691,12 +675,10 @@
# Date.valid_date?(2001, 2, 29) # => false
# Date.valid_date?(2001, 2, -1) # => true
#
# See argument [start](rdoc-ref:calendars.rdoc@Argument+start).
#
- # Date.valid_date? is an alias for Date.valid_civil?.
- #
# Related: Date.jd, Date.new.
#
def self.valid_date?: (Integer year, Integer month, Integer mday, ?Integer start) -> bool
# <!--
@@ -960,12 +942,10 @@
#
# Date.new(2001, 2, 3).asctime # => "Sat Feb 3 00:00:00 2001"
#
# See [asctime](https://linux.die.net/man/3/asctime).
#
- # Date#ctime is an alias for Date#asctime.
- #
def asctime: () -> String
# <!-- rdoc-file=ext/date/date_core.c -->
# Equivalent to #strftime with argument `'%a %b %e %T %Y'` (or its [shorthand
# form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+Specifiers)
@@ -973,12 +953,10 @@
#
# Date.new(2001, 2, 3).asctime # => "Sat Feb 3 00:00:00 2001"
#
# See [asctime](https://linux.die.net/man/3/asctime).
#
- # Date#ctime is an alias for Date#asctime.
- #
def ctime: () -> String
# <!--
# rdoc-file=ext/date/date_core.c
# - cwday -> integer
@@ -1014,12 +992,10 @@
# <!-- rdoc-file=ext/date/date_core.c -->
# Returns the day of the month in range (1..31):
#
# Date.new(2001, 2, 3).mday # => 3
#
- # Date#day is an alias for Date#mday.
- #
def day: () -> Integer
# <!--
# rdoc-file=ext/date/date_core.c
# - deconstruct_keys(array_of_names_or_nil) -> hash
@@ -1129,12 +1105,10 @@
# form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+Specifiers)
# `'%F'`);
#
# Date.new(2001, 2, 3).iso8601 # => "2001-02-03"
#
- # Date#xmlschema is an alias for Date#iso8601.
- #
def iso8601: () -> String
# <!--
# rdoc-file=ext/date/date_core.c
# - italy -> new_date
@@ -1214,12 +1188,10 @@
# -->
# Returns the day of the month in range (1..31):
#
# Date.new(2001, 2, 3).mday # => 3
#
- # Date#day is an alias for Date#mday.
- #
def mday: () -> Integer
# <!--
# rdoc-file=ext/date/date_core.c
# - d.mjd -> integer
@@ -1238,12 +1210,10 @@
# -->
# Returns the month in range (1..12):
#
# Date.new(2001, 2, 3).mon # => 2
#
- # Date#month is an alias for Date#mon.
- #
def mon: () -> Integer
# <!--
# rdoc-file=ext/date/date_core.c
# - monday? -> true or false
@@ -1255,12 +1225,10 @@
# <!-- rdoc-file=ext/date/date_core.c -->
# Returns the month in range (1..12):
#
# Date.new(2001, 2, 3).mon # => 2
#
- # Date#month is an alias for Date#mon.
- #
def month: () -> Integer
# <!--
# rdoc-file=ext/date/date_core.c
# - new_start(start = Date::ITALY]) -> new_date
@@ -1284,12 +1252,10 @@
#
# d = Date.new(2001, 2, 3)
# d.to_s # => "2001-02-03"
# d.next.to_s # => "2001-02-04"
#
- # Date#succ is an alias for Date#next.
- #
def next: () -> Date
# <!--
# rdoc-file=ext/date/date_core.c
# - next_day(n = 1) -> new_date
@@ -1345,12 +1311,10 @@
# Equivalent to #strftime with argument `'%a, %-d %b %Y %T %z'`; see [Formats
# for Dates and Times](rdoc-ref:strftime_formatting.rdoc):
#
# Date.new(2001, 2, 3).rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
#
- # Date#rfc822 is an alias for Date#rfc2822.
- #
def rfc2822: () -> String
# <!--
# rdoc-file=ext/date/date_core.c
# - rfc3339 -> string
@@ -1375,12 +1339,10 @@
#
# * Argument [start](rdoc-ref:calendars.rdoc@Argument+start).
# * Argument [limit](rdoc-ref:Date@Argument+limit).
#
#
- # Date.rfc822 is an alias for Date.rfc2822.
- #
# Related: Date._rfc2822 (returns a hash).
#
def rfc822: () -> String
# <!--
@@ -1465,12 +1427,10 @@
#
# d = Date.new(2001, 2, 3)
# d.to_s # => "2001-02-03"
# d.next.to_s # => "2001-02-04"
#
- # Date#succ is an alias for Date#next.
- #
def succ: () -> Date
# <!--
# rdoc-file=ext/date/date_core.c
# - sunday? -> true or false
@@ -1568,11 +1528,9 @@
# Equivalent to #strftime with argument `'%Y-%m-%d'` (or its [shorthand
# form](rdoc-ref:strftime_formatting.rdoc@Shorthand+Conversion+Specifiers)
# `'%F'`);
#
# Date.new(2001, 2, 3).iso8601 # => "2001-02-03"
- #
- # Date#xmlschema is an alias for Date#iso8601.
#
def xmlschema: () -> String
# <!--
# rdoc-file=ext/date/date_core.c