Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to_date, to_datetime and to_time #2872

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

foomin10
Copy link
Contributor

Fix #2848

Date および DateTime クラスの
#to_date、#to_datetime、#to_time メソッドを修正しました。

Date#to_date、DateTime#to_datetime は self を返します。

refm/api/src/date/Date Outdated Show resolved Hide resolved
@@ -823,4 +823,4 @@ XML Scheme (date) による書式の文字列を返します。
対応する [[c:DateTime]] オブジェクトを返します。

--- to_time -> Time
対応する [[c:Time]] オブジェクトを返します。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

元の説明であっているようです。

% ruby -r date -e 'd = Date.today; p [d.to_time.class, d.equal?(d.to_time)]'
[Time, false]

@foomin10 foomin10 requested a review from znz June 11, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Date#to_date , DateTime#to_date, #to_datetime
2 participants