るりまサーチ

最速Rubyリファレンスマニュアル検索!
169件ヒット [1-100件を表示] (0.142秒)
トップページ > クエリ:i[x] > クエリ:-[x] > クエリ:month[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. matrix i

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

Time#month -> Integer (18319.0)

月を整数で返します。

...月を整数で返します。

//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5) # => 2000-01-02 03:04:05 +0900
p t.month # => 1
p t.mon # => 1
//}...

Date#month -> Integer (15317.0)

月を返します (1-12)。

...月を返します (1-12)。...

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

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

...-31)
* %e: 日。一桁の場合、半角空白で埋める ( 1..31)
* %F: %Y-%m-%d と同等 (ISO 8601の日付フォーマット)
* %G: ISO 8601の暦週の年
* %g: ISO 8601の暦週の年の下2桁(00-99)
* %H: 24時間制の時(00-23)
* %h: %b と同等
* %I: 12時間制の時(01-...
...* %j: 年中の通算日(001-366)
* %k: 24時間制の時。一桁の場合、半角空白で埋める ( 0..23)
* %L: ミリ秒 (000..999)
* %l: 12時間制の時。一桁の場合、半角空白で埋める ( 0..12)
* %M: 分(00-59)
* %m: 月を表す数字(01-12)
* %n: 改行 (\n)
*...
....strftime("%Y%m%d") # => 20010203 Calendar date (basic)
p t.strftime("%F") # => 2001-02-03 Calendar date (extended)
p t.strftime("%Y-%m") # => 2001-02 Calendar date, reduced accuracy, specific month
p t.strftime("%Y...

Exception#backtrace_locations -> [Thread::Backtrace::Location] (9348.0)

バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。

...ception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。

現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。

//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if D...
...000, month, -1).day == 31
raise "#{month} is not long month"
end

def get_exception
return begin
yield
rescue => e
e
end
end

e = get_exception { check_long_month(2) }
p e.backtrace_locations
# => ["test.rb:4:in `check_long_month'", "test.rb:15:in `block in <main>'", "test.rb:9:in `g...
...et_exception'", "test.rb:15:in `<main>'"]
//}

@see Exception#backtrace...

CGI::RFC822_MONTHS -> [String] (9300.0)

822 で定義されている月名の略称を返します。

822 で定義されている月名の略称を返します。

@see 822

絞り込み条件を変える

Time (6060.0)

時刻を表すクラスです。

...時刻を表すクラスです。

Time.now は現在の時刻を返します。
File.mtime などが返すファイルのタイムスタンプは Time
オブジェクトです。

Time オブジェクトは時刻を起算時からの経過秒数で保持しています。
起算時は協定世界...
...mlist[][ruby]{
p Marshal.load(Marshal.dump(Time.now.gmtime)).zone
# => "UTC"
//}

time ライブラリによって、Time.parse, Time.rfc2822, Time.httpdate, Time.iso8601 等が拡張されます。

Ruby 1.9.2 以降の Time クラスのデザインの詳細は
https://staff.aist.go.jp/tanaka-akira...
...apporo-rubykaigi-02-akr-2009.pdf や
「APIデザインケーススタディ」(https://gihyo.jp/book/2016/978-4-7741-7802-8)
の第4章を参照してください。

localtime(3) も参照してください。

=== C 言語との違いに注意

C 言語の tm 構造体とは異なり、month...

Time#httpdate -> String (3268.0)

2616 で定義されている HTTP-date の rfc1123-date 形式の文字列を 返します。

...HTTP-date の rfc1123-date 形式の文字列を
返します。

@return 以下の形式の文字列を返します。
//emlist{
day-of-week, DD month-name CCYY hh:mm:ss GMT
//}
注意: 結果はいつも UTC (GMT) です。

使用例
require 'time'

i
so8601_time = '2008-08-31T12:34...
...:56+09:00'
t = Time.iso8601(iso8601_time)
p t.httpdate #=> "Sun, 31 Aug 2008 03:34:56 GMT"...

Time#rfc2822 -> String (3258.0)

2822 で定義されている date-time として表現される形式の文字列を 返します。

...義されている date-time として表現される形式の文字列を
返します。

@return 以下の形式の文字列を返します。
//emlist{
day-of-week, DD month-name CCYY hh:mm:ss zone
//}
ただし zone は [+-]hhmm です。
self が UTC time の場合、zone は...
...+0000 になります。

使用例
require 'time'

i
so8601_time = '2008-08-31T12:34:56+09:00'
t = Time.iso8601(iso8601_time)
p t.rfc2822 #=> "Sun, 31 Aug 2008 03:34:56 -0000"...

Time#rfc822 -> String (3258.0)

2822 で定義されている date-time として表現される形式の文字列を 返します。

...義されている date-time として表現される形式の文字列を
返します。

@return 以下の形式の文字列を返します。
//emlist{
day-of-week, DD month-name CCYY hh:mm:ss zone
//}
ただし zone は [+-]hhmm です。
self が UTC time の場合、zone は...
...+0000 になります。

使用例
require 'time'

i
so8601_time = '2008-08-31T12:34:56+09:00'
t = Time.iso8601(iso8601_time)
p t.rfc2822 #=> "Sun, 31 Aug 2008 03:34:56 -0000"...

Time#mon -> Integer (3219.0)

月を整数で返します。

...月を整数で返します。

//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5) # => 2000-01-02 03:04:05 +0900
p t.month # => 1
p t.mon # => 1
//}...

絞り込み条件を変える

<< 1 2 > >>