Skip to content

Instantly share code, notes, and snippets.

@shoyan shoyan/8hour45min.ruby
Last active Oct 16, 2018

Embed
What would you like to do?
今から8時間45分後を計算する
# 時刻を加算するにはRationalを足す。
# 1分後はRational(1, 24*60)
# 8時間45分は525分なのでRational(525, 24*60)を加算すればよい
DateTime.now + Rational(525,24*60)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.