るりまサーチ

最速Rubyリファレンスマニュアル検索!
124件ヒット [101-124件を表示] (0.086秒)

別のキーワード

  1. rss hour
  2. time hour
  3. date hour
  4. rss hour=
  5. datetime hour

検索結果

<< < 1 2 >>

RSS::Maker::ChannelBase::SkipHoursBase::HourBase#content=() (6017.0)

@todo

...@todo...

DateTime#deconstruct_keys(array_of_names_or_nil) -> Hash (31.0)

パターンマッチに使用する名前と値の Hash を返します。

...す。

キーに利用できる名前は以下の通りです。

* :year
* :month
* :day
* :yday
* :wday
* :hour
* :min
* :sec
* :sec_fraction
* :zone

@
param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全てを...
...パターンマッチに使用します。

//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 "too old"
in month: ..9...
...> "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 (19.0)

パターンマッチに使用する名前と値の Hash を返します。

...す。

キーに利用できる名前は以下の通りです。

* :year
* :month
* :day
* :yday
* :wday
* :hour
* :min
* :sec
* :subsec
* :dst
* :zone

@
param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全て...
...ng day in month #{month}"
end
#=> "working day in month 10" が出力される

# クラスのチェックと組み合わせて利用することもできます
if t in Time(wday: 3, day: ..7)
puts "first Wednesday of the month"
end
//}

@
see d:spec/pattern_matching#matching_non_primitive_objects...

Time#strftime(format) -> String (13.0)

時刻を format 文字列に従って文字列に変換した結果を返します。

...時刻を format 文字列に従って文字列に変換した結果を返します。

@
param format フォーマット文字列を指定します。使用できるものは 以下の通りです。

* %A: 曜日の名称(Sunday, Monday ... )
* %a: 曜日の省略名(Sun, Mon ... )
* %B: 月...
...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,%...
<< < 1 2 >>