160件ヒット
[101-160件を表示]
(0.068秒)
別のキーワード
クラス
- DateTime (14)
-
RSS
:: Maker :: ChannelBase (12) -
RSS
:: Maker :: ChannelBase :: SkipHoursBase (12) -
RSS
:: Maker :: ChannelBase :: SkipHoursBase :: HourBase (24) -
RSS
:: Rss :: Channel (24) -
RSS
:: Rss :: SkipHours (36) - Time (38)
キーワード
- content (12)
- content= (12)
-
deconstruct
_ keys (4) - hour= (12)
- hours (12)
-
new
_ hour (12) - skipHours (24)
- skipHours= (12)
- strftime (12)
-
to
_ a (12)
検索結果
先頭5件
-
RSS
:: Rss :: Channel # skipHours= (6101.0) -
@todo
@todo -
RSS
:: Maker :: ChannelBase :: SkipHoursBase :: HourBase # content (6001.0) -
@todo
@todo -
RSS
:: Maker :: ChannelBase :: SkipHoursBase :: HourBase # content=() (6001.0) -
@todo
@todo -
DateTime
# deconstruct _ keys(array _ of _ names _ or _ nil) -> Hash (19.0) -
パターンマッチに使用する名前と値の Hash を返します。
...値の Hash を返します。
キーに利用できる名前は以下の通りです。
* :year
* :month
* :day
* :yday
* :wday
* :hour
* :min
* :sec
* :sec_fraction
* :zone
@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。n......l の場合は全てをパターンマッチに使用します。
//emlist[例][ruby]{
dt = DateTime.new(2022, 10, 5, 13, 30)
if dt in wday: 1..5, hour: 10..18 # deconstruct_keys が使われます
puts "Working time"
end
#=> "Working time" が出力される
case dt
in year: ...2022
puts "to......> "working day in month 10" が出力される
# クラスのチェックと組み合わせて利用することもできます
if dt in DateTime(wday: 1..5, hour: 10..18, day: ..7)
puts "Working time, first week of the month"
end
//}
@see d:spec/pattern_matching#matching_non_primitive_objects... -
Time
# deconstruct _ keys(array _ of _ names _ or _ nil) -> Hash (7.0) -
パターンマッチに使用する名前と値の Hash を返します。
...値の Hash を返します。
キーに利用できる名前は以下の通りです。
* :year
* :month
* :day
* :yday
* :wday
* :hour
* :min
* :sec
* :subsec
* :dst
* :zone
@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します... -
Time
# strftime(format) -> String (7.0) -
時刻を format 文字列に従って文字列に変換した結果を返します。
...reduced accuracy, specific minute (extended)
p t.strftime("%H") # => 04 Local time, reduced accuracy, specific hour
p t.strftime("%H%M%S,%L") # => 040506,000 Local time with decimal fraction, comma as decimal sign (basic)
p t.strftime("%T,%... -
Time
# to _ a -> Array (7.0) -
時刻を10要素の配列で返します。
...す。
その要素は順序も含めて以下の通りです。
* sec: 秒 (整数 0-60) (60はうるう秒)
* min: 分 (整数 0-59)
* hour: 時 (整数 0-23)
* mday: 日 (整数)
* mon: 月 (整数 1-12)
* year: 年 (整数 2000年=2000)
* wday: 曜日 (整数 0-6)
* y...