2件ヒット
[1-2件を表示]
(0.213秒)
検索結果
-
Time
# wday -> Integer (78442.0) -
曜日を0(日曜日)から6(土曜日)の整数で返します。
...sun = Time.new(2017, 9, 17, 10, 34, 15, '+09:00') # => 2017-09-17 10:34:15 +0900
p sun.wday # => 0
p mon = Time.new(2017, 9, 18, 10, 34, 15, '+09:00') # => 2017-09-18 10:34:15 +0900
p mon.wday # => 1
p tue = Time.new(......wed = Time.new(2017, 9, 20, 10, 34, 15, '+09:00') # => 2017-09-20 10:34:15 +0900
p wed.wday # => 3
p thu = Time.new(2017, 9, 21, 10, 34, 15, '+09:00') # => 2017-09-21 10:34:15 +0900
p thu.wday # => 4
p fri = Time.new(......2017, 9, 22, 10, 34, 15, '+09:00') # => 2017-09-22 10:34:15 +0900
p fri.wday # => 5
p sat = Time.new(2017, 9, 23, 10, 34, 15, '+09:00') # => 2017-09-23 10:34:15 +0900
p sat.wday # => 6
//}... -
Time
# to _ a -> Array (24031.0) -
時刻を10要素の配列で返します。
...内通算日 (整数 1-366)
* isdst: 夏時間であるかどうか (true/false)
* zone: タイムゾーン (文字列)
//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5)
p t # => 2000-01-02 03:04:05 +0900
p t.to_a # => [5, 4, 3, 2, 1, 2000, 0, 2, false, "JST"]
//}
要素の順序は C...