ÿØÿà JFIF ÿÛ „ ( %!1!%)+//.383,7(-.+
-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ ¥2" ÿÄ ÿÄ J ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ ÿÄ * !1AQa‘"2q3±ð#b¡ÿÚ ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁTÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßwpŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
?>
.........................................
.............................................................................
ÿØÿà JFIF ÿÛ „
(
%!1!%)+//.383,7(-.+
-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ ¥2" ÿÄ
ÿÄ J ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ
ÿÄ * !1AQa‘"2q3±ð#b¡ÿÚ
? ¼QxJQaÍuò¸Zö
Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁTÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßwpŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
?>
.........................................
.............................................................................
????????????????????????????????????
????????????????????????????????????
ÿØÿà JFIF ÿÛ „ ( %!1!%)+//.383,7(-.+
-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ ¥2" ÿÄ ÿÄ J ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ ÿÄ * !1AQa‘"2q3±ð#b¡ÿÚ ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁTÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßwpŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
?>
.........................................
.............................................................................
ÿØÿà JFIF ÿÛ „
(
%!1!%)+//.383,7(-.+
-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ ¥2" ÿÄ
ÿÄ J ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ
ÿÄ * !1AQa‘"2q3±ð#b¡ÿÚ
? ¼QxJQaÍuò¸Zö
Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁTÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßwpŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
?>
.........................................
.............................................................................
????????????????????????????????????
????????????????????????????????????
U:RDoc::TopLevel[ i I"strftime_formatting.rdoc:ETcRDoc::Parser::Simpleo:RDoc::Markup::Document:@parts[|S:RDoc::Markup::Heading:
leveli: textI" Formats for Dates and Times;To:RDoc::Markup::BlankLine o:RDoc::Markup::Paragraph;[I"HSeveral Ruby time-related classes have instance method +strftime+, ;TI"Qwhich returns a formatted string representing all or part of a date or time:;T@
o:RDoc::Markup::List:
@type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o;
;[I"Date#strftime.;To;;0;[o;
;[I"DateTime#strftime.;To;;0;[o;
;[I"Time#strftime.;T@
o;
;[I"=Each of these methods takes optional argument +format+, ;TI"Kwhich has zero or more embedded _format_ _specifications_ (see below).;T@
o;
;[I"LEach of these methods returns the string resulting from replacing each ;TI"Bformat specification embedded in +format+ with a string form ;TI".of one or more parts of the date or time.;T@
o;
;[I"A simple example:;T@
o:RDoc::Markup::Verbatim;[I"3Time.now.strftime('%H:%M:%S') # => "14:02:07"
;T:@format0o;
;[I")A format specification has the form:;T@
o;;[I"%[flags][width]conversion
;T;0o;
;[I"It consists of:;T@
o;;;;[ o;;0;[o;
;[I"!A leading percent character.;To;;0;[o;
;[I"0Zero or more _flags_ (each is a character).;To;;0;[o;
;[I"2An optional _width_ _specifier_ (an integer).;To;;0;[o;
;[I".A _conversion_ _specifier_ (a character).;T@
o;
;[I"/Except for the leading percent character, ;TI"Othe only required part is the conversion specifier, so we begin with that.;T@
S; ;
i;I"Conversion Specifiers;T@
S; ;
i;I"\Date (Year, Month, Day);T@
o;;;;[o;;0;[o;
;[I"7%Y - Year including century, zero-padded:;T@
o;;[ I"0Time.now.strftime('%Y') # => "2022"
;TI"FTime.new(-1000).strftime('%Y') # => "-1000" # Before common era.
;TI"?Time.new(10000).strftime('%Y') # => "10000" # Far future.
;TI"KTime.new(10).strftime('%Y') # => "0010" # Zero-padded by default.
;T;0o;;0;[o;
;[I"F%y - Year without century, in range (0.99), zero-padded:;T@
o;;[I"*Time.now.strftime('%y') # => "22"
;TI"DTime.new(1).strftime('%y') # => "01" # Zero-padded by default.
;T;0o;;0;[o;
;[I"(%C - Century, zero-padded:;T@
o;;[ I".Time.now.strftime('%C') # => "20"
;TI"DTime.new(-1000).strftime('%C') # => "-10" # Before common era.
;TI"=Time.new(10000).strftime('%C') # => "100" # Far future.
;TI"ITime.new(100).strftime('%C') # => "01" # Zero-padded by default.
;T;0o;;0;[o;
;[I"D%m - Month of the year, in range (1..12), zero-padded:;T@
o;;[I"KTime.new(2022, 1).strftime('%m') # => "01" # Zero-padded by default.
;TI"1Time.new(2022, 12).strftime('%m') # => "12"
;T;0o;;0;[o;
;[I"0%B - Full month name, capitalized:;T@
o;;[I"6Time.new(2022, 1).strftime('%B') # => "January"
;TI"7Time.new(2022, 12).strftime('%B') # => "December"
;T;0o;;0;[o;
;[I"7%b - Abbreviated month name, capitalized:;T@
o;;[I"2Time.new(2022, 1).strftime('%b') # => "Jan"
;TI"2Time.new(2022, 12).strftime('%h') # => "Dec"
;T;0o;;0;[o;
;[I"'%h - Same as %b.;T@
o;;0;[o;
;[I"C%d - Day of the month, in range (1..31), zero-padded:;T@
o;;[I"4Time.new(2002, 1, 1).strftime('%d') # => "01"
;TI"4Time.new(2002, 1, 31).strftime('%d') # => "31"
;T;0o;;0;[o;
;[I"D%e - Day of the month, in range (1..31), blank-padded:;T@
o;;[I"4Time.new(2002, 1, 1).strftime('%e') # => " 1"
;TI"4Time.new(2002, 1, 31).strftime('%e') # => "31"
;T;0o;;0;[o;
;[I"C%j - Day of the year, in range (1..366), zero-padded:;T@
o;;[I"6Time.new(2002, 1, 1).strftime('%j') # => "001"
;TI"6Time.new(2002, 12, 31).strftime('%j') # => "365"
;T;0S; ;
i;I",\Time (Hour, Minute, Second, Subsecond);T@
o;;;;[o;;0;[o;
;[I"B%H - Hour of the day, in range (0..23), zero-padded:;T@
o;;[I"7Time.new(2022, 1, 1, 1).strftime('%H') # => "01"
;TI"7Time.new(2022, 1, 1, 13).strftime('%H') # => "13"
;T;0o;;0;[o;
;[I"C%k - Hour of the day, in range (0..23), blank-padded:;T@
o;;[I"7Time.new(2022, 1, 1, 1).strftime('%k') # => " 1"
;TI"7Time.new(2022, 1, 1, 13).strftime('%k') # => "13"
;T;0o;;0;[o;
;[I"B%I - Hour of the day, in range (1..12), zero-padded:;T@
o;;[I"7Time.new(2022, 1, 1, 1).strftime('%I') # => "01"
;TI"7Time.new(2022, 1, 1, 13).strftime('%I') # => "01"
;T;0o;;0;[o;
;[I"C%l - Hour of the day, in range (1..12), blank-padded:;T@
o;;[I"7Time.new(2022, 1, 1, 1).strftime('%l') # => " 1"
;TI"7Time.new(2022, 1, 1, 13).strftime('%l') # => " 1"
;T;0o;;0;[o;
;[I"1%P - Meridian indicator, lowercase:;T@
o;;[I"7Time.new(2022, 1, 1, 1).strftime('%P') # => "am"
;TI"7Time.new(2022, 1, 1, 13).strftime('%P') # => "pm"
;T;0o;;0;[o;
;[I"1%p - Meridian indicator, uppercase:;T@
o;;[I"7Time.new(2022, 1, 1, 1).strftime('%p') # => "AM"
;TI"7Time.new(2022, 1, 1, 13).strftime('%p') # => "PM"
;T;0o;;0;[o;
;[I"E%M - Minute of the hour, in range (0..59), zero-padded:;T@
o;;[I" "00"
;T;0o;;0;[o;
;[I"F%S - Second of the minute in range (0..59), zero-padded:;T@
o;;[I"?Time.new(2022, 1, 1, 1, 0, 0, 0).strftime('%S') # => "00"
;T;0o;;0;[o;
;[I"M%L - Millisecond of the second, in range (0..999), zero-padded:;T@
o;;[I"@Time.new(2022, 1, 1, 1, 0, 0, 0).strftime('%L') # => "000"
;T;0o;;0;[o;
;[I"O%N - Fractional seconds, default width is 9 digits (nanoseconds):;T@
o;;[I"?t = Time.now # => 2022-06-29 07:10:20.3230914 -0500
;TI"Et.strftime('%N') # => "323091400" # Default.
;T;0o;
;[I"PUse {width specifiers}[rdoc-ref:strftime_formatting.rdoc@Width+Specifiers] ;TI"to adjust units:;T@
o;;[
I"Ht.strftime('%3N') # => "323" # Milliseconds.
;TI"Ht.strftime('%6N') # => "323091" # Microseconds.
;TI"Gt.strftime('%9N') # => "323091400" # Nanoseconds.
;TI"Gt.strftime('%12N') # => "323091400000" # Picoseconds.
;TI"It.strftime('%15N') # => "323091400000000" # Femptoseconds.
;TI"Gt.strftime('%18N') # => "323091400000000000" # Attoseconds.
;TI"Ht.strftime('%21N') # => "323091400000000000000" # Zeptoseconds.
;TI"Ht.strftime('%24N') # => "323091400000000000000000" # Yoctoseconds.
;T;0o;;0;[o;
;[I"5%s - Number of seconds since the epoch:;T@
o;;[I"/Time.now.strftime('%s') # => "1656505136"
;T;0S; ;
i;I"
Timezone;T@
o;;;;[o;;0;[o;
;[I"?%z - Timezone as hour and minute offset from UTC:;T@
o;;[I"*Time.now.strftime('%z') # => "-0500"
;T;0o;;0;[o;
;[I"6%Z - Timezone name (platform-dependent):;T@
o;;[I":Time.now.strftime('%Z') # => "Central Daylight Time"
;T;0S; ;
i;I"Weekday;T@
o;;;;[ o;;0;[o;
;[I"%%A - Full weekday name:;T@
o;;[I".Time.now.strftime('%A') # => "Wednesday"
;T;0o;;0;[o;
;[I",%a - Abbreviated weekday name:;T@
o;;[I"(Time.now.strftime('%a') # => "Wed"
;T;0o;;0;[o;
;[I"A%u - Day of the week, in range (1..7), Monday is 1:;T@
o;;[I">t = Time.new(2022, 6, 26) # => 2022-06-26 00:00:00 -0500
;TI"*t.strftime('%a') # => "Sun"
;TI"(t.strftime('%u') # => "7"
;T;0o;;0;[o;
;[I"A%w - Day of the week, in range (0..6), Sunday is 0:;T@
o;;[I">t = Time.new(2022, 6, 26) # => 2022-06-26 00:00:00 -0500
;TI"*t.strftime('%a') # => "Sun"
;TI"(t.strftime('%w') # => "0"
;T;0S; ;
i;I"Week Number;T@
o;;;;[o;;0;[o;
;[I"K%U - Week number of the year, in range (0..53), zero-padded, ;TI"(where each week begins on a Sunday:;T@
o;;[I">t = Time.new(2022, 6, 26) # => 2022-06-26 00:00:00 -0500
;TI"*t.strftime('%a') # => "Sun"
;TI")t.strftime('%U') # => "26"
;T;0o;;0;[o;
;[I"K%W - Week number of the year, in range (0..53), zero-padded, ;TI"(where each week begins on a Monday:;T@
o;;[I">t = Time.new(2022, 6, 26) # => 2022-06-26 00:00:00 -0500
;TI"*t.strftime('%a') # => "Sun"
;TI")t.strftime('%W') # => "25"
;T;0S; ;
i;I"Week Dates;T@
o;
;[I"RSee {ISO 8601 week dates}[https://en.wikipedia.org/wiki/ISO_8601#Week_dates].;T@
o;;[I">t0 = Time.new(2023, 1, 1) # => 2023-01-01 00:00:00 -0600
;TI">t1 = Time.new(2024, 1, 1) # => 2024-01-01 00:00:00 -0600
;T;0o;;;;[o;;0;[o;
;[I"#%G - Week-based year:;T@
o;;[I"#t0.strftime('%G') # => "2022"
;TI"#t1.strftime('%G') # => "2024"
;T;0o;;0;[o;
;[I"R%g - Week-based year without century, in range (0..99), zero-padded:;T@
o;;[I"!t0.strftime('%g') # => "22"
;TI"!t1.strftime('%g') # => "24"
;T;0o;;0;[o;
;[I"I%V - Week number of the week-based year, in range (1..53), ;TI"zero-padded:;T@
o;;[I"!t0.strftime('%V') # => "52"
;TI"!t1.strftime('%V') # => "01"
;T;0S; ;
i;I"
Literals;T@
o;;;;[o;;0;[o;
;[I"*%n - Newline character "\n":;T@
o;;[I"'Time.now.strftime('%n') # => "\n"
;T;0o;;0;[o;
;[I"&%t - Tab character "\t":;T@
o;;[I"'Time.now.strftime('%t') # => "\t"
;T;0o;;0;[o;
;[I")%% - Percent character '%':;T@
o;;[I"&Time.now.strftime('%%') # => "%"
;T;0S; ;
i;I"$Shorthand Conversion Specifiers;T@
o;
;[I"CEach shorthand specifier here is shown with its corresponding ;TI"longhand specifier.;T@
o;;;;[o;;0;[o;
;[I""%c - \Date and time:;T@
o;;[I"ITime.now.strftime('%c') # => "Wed Jun 29 08:01:41 2022"
;TI"ITime.now.strftime('%a %b %e %T %Y') # => "Wed Jun 29 08:02:07 2022"
;T;0o;;0;[o;
;[I"%D - \Date:;T@
o;;[I"3Time.now.strftime('%D') # => "06/29/22"
;TI"3Time.now.strftime('%m/%d/%y') # => "06/29/22"
;T;0o;;0;[o;
;[I"!%F - ISO 8601 date:;T@
o;;[I"5Time.now.strftime('%F') # => "2022-06-29"
;TI"5Time.now.strftime('%Y-%m-%d') # => "2022-06-29"
;T;0o;;0;[o;
;[I"%v - VMS date:;T@
o;;[I"8Time.now.strftime('%v') # => "29-JUN-2022"
;TI"8Time.now.strftime('%e-%^b-%4Y') # => "29-JUN-2022"
;T;0o;;0;[o;
;[I"'%x - Same as %D.;T@
o;;0;[o;
;[I"'%X - Same as %T.;T@
o;;0;[o;
;[I" %r - 12-hour time:;T@
o;;[ I"ITime.new(2022, 1, 1, 1).strftime('%r') # => "01:00:00 AM"
;TI"ITime.new(2022, 1, 1, 1).strftime('%I:%M:%S %p') # => "01:00:00 AM"
;TI"ITime.new(2022, 1, 1, 13).strftime('%r') # => "01:00:00 PM"
;TI"ITime.new(2022, 1, 1, 13).strftime('%I:%M:%S %p') # => "01:00:00 PM"
;T;0o;;0;[o;
;[I" %R - 24-hour time:;T@
o;;[ I"=Time.new(2022, 1, 1, 1).strftime('%R') # => "01:00"
;TI"=Time.new(2022, 1, 1, 1).strftime('%H:%M') # => "01:00"
;TI"=Time.new(2022, 1, 1, 13).strftime('%R') # => "13:00"
;TI"=Time.new(2022, 1, 1, 13).strftime('%H:%M') # => "13:00"
;T;0o;;0;[o;
;[I" %T - 24-hour time:;T@
o;;[ I"CTime.new(2022, 1, 1, 1).strftime('%T') # => "01:00:00"
;TI"CTime.new(2022, 1, 1, 1).strftime('%H:%M:%S') # => "01:00:00"
;TI"CTime.new(2022, 1, 1, 13).strftime('%T') # => "13:00:00"
;TI"CTime.new(2022, 1, 1, 13).strftime('%H:%M:%S') # => "13:00:00"
;T;0o;;0;[o;
;[I"C%+ (not supported in Time#strftime) - \Date and time:;T@
o;;[ I"!DateTime.now.strftime('%+')
;TI",# => "Wed Jun 29 08:31:53 -05:00 2022"
;TI"6DateTime.now.strftime('%a %b %e %H:%M:%S %Z %Y')
;TI",# => "Wed Jun 29 08:32:18 -05:00 2022"
;T;0S; ;
i;I"
Flags;T@
o;
;[I"8Flags may affect certain formatting specifications.;T@
o;
;[I"EMultiple flags may be given with a single conversion specified; ;TI"order does not matter.;T@
S; ;
i;I"Padding Flags;T@
o;;;;[o;;0;[o;
;[I""0 - Pad with zeroes:;T@
o;;[I".Time.new(10).strftime('%0Y') # => "0010"
;T;0o;;0;[o;
;[I""_ - Pad with blanks:;T@
o;;[I".Time.new(10).strftime('%_Y') # => " 10"
;T;0o;;0;[o;
;[I"- - Don't pad:;T@
o;;[I",Time.new(10).strftime('%-Y') # => "10"
;T;0S; ;
i;I"Casing Flags;T@
o;;;;[o;;0;[o;
;[I" ^ - Upcase result:;T@
o;;[I"HTime.new(2022, 1).strftime('%B') # => "January" # No casing flag.
;TI"6Time.new(2022, 1).strftime('%^B') # => "JANUARY"
;T;0o;;0;[o;
;[I""# - Swapcase result:;T@
o;;[I"(Time.now.strftime('%p') # => "AM"
;TI"(Time.now.strftime('%^p') # => "AM"
;TI"(Time.now.strftime('%#p') # => "am"
;T;0S; ;
i;I"Timezone Flags;T@
o;;;;[o;;0;[o;
;[I"D: - Put timezone as colon-separated hours and minutes:;T@
o;;[I"-Time.now.strftime('%:z') # => "-05:00"
;T;0o;;0;[o;
;[I"O:: - Put timezone as colon-separated hours, minutes, and seconds:;T@
o;;[I"0Time.now.strftime('%::z') # => "-05:00:00"
;T;0S; ;
i;I"Width Specifiers;T@
o;
;[I"OThe integer width specifier gives a minimum width for the returned string:;T@
o;;[
I"OTime.new(2002).strftime('%Y') # => "2002" # No width specifier.
;TI";Time.new(2002).strftime('%10Y') # => "0000002002"
;TI"OTime.new(2002, 12).strftime('%B') # => "December" # No width specifier.
;TI";Time.new(2002, 12).strftime('%10B') # => " December"
;TI"QTime.new(2002, 12).strftime('%3B') # => "December" # Ignored if too small.
;T;0S; ;
i;I"Specialized Format Strings;T@
o;
;[I"0Here are a few specialized format strings, ;TI"(each based on an external standard.;T@
S; ;
i;I"HTTP Format;T@
o;
;[I"&The HTTP date format is based on ;TI"9{RFC 2616}[https://www.rfc-editor.org/rfc/rfc2616], ;TI"Cand treats dates in the format '%a, %d %b %Y %T GMT':;T@
o;;[
I"7d = Date.new(2001, 2, 3) # => #
;TI"%# Return HTTP-formatted string.
;TI"Chttpdate = d.httpdate # => "Sat, 03 Feb 2001 00:00:00 GMT"
;TI":# Return new date parsed from HTTP-formatted string.
;TI"7Date.httpdate(httpdate) # => #
;TI"6# Return hash parsed from HTTP-formatted string.
;TI"Date._httpdate(httpdate)
;TI"k# => {:wday=>6, :mday=>3, :mon=>2, :year=>2001, :hour=>0, :min=>0, :sec=>0, :zone=>"GMT", :offset=>0}
;T;0S; ;
i;I"RFC 3339 Format;T@
o;
;[I"*The RFC 3339 date format is based on ;TI"8{RFC 3339}[https://www.rfc-editor.org/rfc/rfc3339]:;T@
o;;[
I"7d = Date.new(2001, 2, 3) # => #
;TI"%# Return 3339-formatted string.
;TI"?rfc3339 = d.rfc3339 # => "2001-02-03T00:00:00+00:00"
;TI":# Return new date parsed from 3339-formatted string.
;TI"7Date.rfc3339(rfc3339) # => #
;TI"6# Return hash parsed from 3339-formatted string.
;TI"Date._rfc3339(rfc3339)
;TI"d# => {:year=>2001, :mon=>2, :mday=>3, :hour=>0, :min=>0, :sec=>0, :zone=>"+00:00", :offset=>0}
;T;0S; ;
i;I"RFC 2822 Format;T@
o;
;[I"*The RFC 2822 date format is based on ;TI"9{RFC 2822}[https://www.rfc-editor.org/rfc/rfc2822], ;TI"Dand treats dates in the format '%a, %-d %b %Y %T %z']:;T@
o;;[
I"7d = Date.new(2001, 2, 3) # => #
;TI"%# Return 2822-formatted string.
;TI"Drfc2822 = d.rfc2822 # => "Sat, 3 Feb 2001 00:00:00 +0000"
;TI":# Return new date parsed from 2822-formatted string.
;TI"7Date.rfc2822(rfc2822) # => #
;TI"6# Return hash parsed from 2822-formatted string.
;TI"Date._rfc2822(rfc2822)
;TI"m# => {:wday=>6, :mday=>3, :mon=>2, :year=>2001, :hour=>0, :min=>0, :sec=>0, :zone=>"+0000", :offset=>0}
;T;0S; ;
i;I"JIS X 0301 Format;T@
o;
;[ I"(The JIS X 0301 format includes the ;TI"K{Japanese era name}[https://en.wikipedia.org/wiki/Japanese_era_name], ;TI"8and treats dates in the format '%Y-%m-%d' ;TI">with the first letter of the romanized era name prefixed:;T@
o;;[I"7d = Date.new(2001, 2, 3) # => #
;TI"%# Return 0301-formatted string.
;TI"/jisx0301 = d.jisx0301 # => "H13.02.03"
;TI":# Return new date parsed from 0301-formatted string.
;TI"7Date.jisx0301(jisx0301) # => #
;TI"6# Return hash parsed from 0301-formatted string.
;TI"DDate._jisx0301(jisx0301) # => {:year=>2001, :mon=>2, :mday=>3}
;T;0S; ;
i;I"#ISO 8601 Format Specifications;T@
o;
;[I"GThis section shows format specifications that are compatible with ;TI"9{ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601]. ;TI":Details for various formats may be seen at the links.;T@
o;
;[I"%Examples in this section assume:;T@
o;;[I"8t = Time.now # => 2022-06-29 16:49:25.465246 -0500
;T;0S; ;
i;I"
Dates;T@
o;
;[I"HSee {ISO 8601 dates}[https://en.wikipedia.org/wiki/ISO_8601#Dates].;T@
o;;;;[ o;;0;[o;
;[I";{Years}[https://en.wikipedia.org/wiki/ISO_8601#Years]:;T@
o;;;;[o;;0;[o;
;[I"Basic year (+YYYY+):;T@
o;;[I""t.strftime('%Y') # => "2022"
;T;0o;;0;[o;
;[I"&Expanded year (±YYYYY):;T@
o;;[I"&t.strftime('+%5Y') # => "+02022"
;TI"&t.strftime('-%5Y') # => "-02022"
;T;0o;;0;[o;
;[I"M{Calendar dates}[https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates]:;T@
o;;;;[o;;0;[o;
;[I"Basic date (+YYYYMMDD+):;T@
o;;[I"*t.strftime('%Y%m%d') # => "20220629"
;T;0o;;0;[o;
;[I")Extended date (YYYY-MM-DD):;T@
o;;[I".t.strftime('%Y-%m-%d') # => "2022-06-29"
;T;0o;;0;[o;
;[I".Reduced extended date (YYYY-MM):;T@
o;;[I"(t.strftime('%Y-%m') # => "2022-06"
;T;0o;;0;[o;
;[I"E{Week dates}[https://en.wikipedia.org/wiki/ISO_8601#Week_dates]:;T@
o;;;;[o;;0;[o;
;[I"*Basic date (+YYYYWww+ or +YYYYWwwD+):;T@
o;;[I"*t.strftime('%Y%Ww') # => "202226w"
;TI"+t.strftime('%Y%Ww%u') # => "202226w3"
;T;0o;;0;[o;
;[I"=Extended date (YYYY-Www or YYYY-Www-D):;T@
o;;[I"-t.strftime('%Y-%Ww') # => "2022-26w"
;TI"/t.strftime('%Y-%Ww-%u') # => "2022-26w-3"
;T;0o;;0;[o;
;[I"K{Ordinal dates}[https://en.wikipedia.org/wiki/ISO_8601#Ordinal_dates]:;T@
o;;;;[o;;0;[o;
;[I"Basic date (+YYYYDDD+):;T@
o;;[I"'t.strftime('%Y%j') # => "2022180"
;T;0o;;0;[o;
;[I"'Extended date (YYYY-DDD):;T@
o;;[I")t.strftime('%Y-%j') # => "2022-180"
;T;0S; ;
i;I"
Times;T@
o;
;[I"HSee {ISO 8601 times}[https://en.wikipedia.org/wiki/ISO_8601#Times].;T@
o;;;;[o;;0;[o;
;[I"Times:;T@
o;;;;[o;;0;[o;
;[I">Basic time (+Thhmmss.sss+, +Thhmmss+, +Thhmm+, or +Thh+):;T@
o;;[ I"1t.strftime('T%H%M%S.%L') # => "T164925.465"
;TI"-t.strftime('T%H%M%S') # => "T164925"
;TI"+t.strftime('T%H%M') # => "T1649"
;TI")t.strftime('T%H') # => "T16"
;T;0o;;0;[o;
;[I"?Extended time (+Thh:mm:ss.sss+, +Thh:mm:ss+, or +Thh:mm+):;T@
o;;[I"5t.strftime('T%H:%M:%S.%L') # => "T16:49:25.465"
;TI"1t.strftime('T%H:%M:%S') # => "T16:49:25"
;TI".t.strftime('T%H:%M') # => "T16:49"
;T;0o;;0;[o;
;[I"[{Time zone designators}[https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators]:;T@
o;;;;[o;;0;[o;
;[I"/Timezone (+time+ represents a valid time, ;TI"++hh+ represents a valid 2-digit hour, ;TI"1and +mm+ represents a valid 2-digit minute):;T@
o;;;;[o;;0;[o;
;[I"IBasic timezone (time±hhmm, time±hh, or +timeZ+):;T@
o;;[I">t.strftime('T%H%M%S%z') # => "T164925-0500"
;TI" "T164925-05"
;TI":t.strftime('T%H%M%SZ') # => "T164925Z"
;T;0o;;0;[o;
;[I".Extended timezone (time±hh:mm):;T@
o;;[I"5t.strftime('T%H:%M:%S%z') # => "T16:49:25-0500"
;T;0o;;0;[o;
;[I"See also:;T@
o;;;;[o;;0;[o;
;[I"a{Local time (unqualified)}[https://en.wikipedia.org/wiki/ISO_8601#Local_time_(unqualified)].;To;;0;[o;
;[I"q{Coordinated Universal Time (UTC)}[https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)].;To;;0;[o;
;[I"[{Time offsets from UTC}[https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC].;T@
S; ;
i;I"Combined \Date and \Time;T@
o;
;[I"See {ISO 8601 Combined date and time representations}[https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations].;T@
o;
;[I"BAn ISO 8601 combined date and time representation may be any ;TI"*ISO 8601 date and any ISO 8601 time, ;TI"!separated by the letter +T+.;T@
o;
;[I".For the relevant +strftime+ formats, see ;TI"6{Dates}[rdoc-ref:strftime_formatting.rdoc@Dates] ;TI"@and {Times}[rdoc-ref:strftime_formatting.rdoc@Times] above.;T:
@file@:0@omit_headings_from_table_of_contents_below0