⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Date
/
View File Name :
cdesc-Date.ri
U:RDoc::NormalClass[iI" Date:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[Jo:RDoc::Markup::Paragraph;[I"9date and datetime class - Tadayoshi Funaba 1998-2011;To:RDoc::Markup::BlankLine o; ;[I"4'date' provides two classes: Date and DateTime.;T@S:RDoc::Markup::Heading: leveli: textI"Terms and Definitions;T@o; ;[I"ESome terms and definitions are based on ISO 8601 and JIS X 0301.;T@S;;i; I"Calendar Date;T@o; ;[I"?The calendar date is a particular day of a calendar year, ;TI"Eidentified by its ordinal number within a calendar month within ;TI"that year.;T@o; ;[I"1In those classes, this is so-called "civil".;T@S;;i; I"Ordinal Date;T@o; ;[I"HThe ordinal date is a particular day of a calendar year identified ;TI"+by its ordinal number within the year.;T@o; ;[I"3In those classes, this is so-called "ordinal".;T@S;;i; I"Week Date;T@o; ;[I"IThe week date is a date identified by calendar week and day numbers.;T@o; ;[ I"EThe calendar week is a seven day period within a calendar year, ;TI"Fstarting on a Monday and identified by its ordinal number within ;TI"Cthe year; the first calendar week of the year is the one that ;TI"@includes the first Thursday of that year. In the Gregorian ;TI"Gcalendar, this is equivalent to the week which includes January 4.;T@o; ;[I"6In those classes, this is so-called "commercial".;T@S;;i; I"Julian Day Number;T@o; ;[I"IThe Julian day number is in elapsed days since noon (Greenwich Mean ;TI";Time) on January 1, 4713 BCE (in the Julian calendar).;T@o; ;[ I"IIn this document, the astronomical Julian day number is the same as ;TI"Fthe original Julian day number. And the chronological Julian day ;TI"Gnumber is a variation of the Julian day number. Its days begin at ;TI"midnight on local time.;T@o; ;[I"IIn this document, when the term "Julian day number" simply appears, ;TI"Bit just refers to "chronological Julian day number", not the ;TI"original.;T@o; ;[I":In those classes, those are so-called "ajd" and "jd".;T@S;;i; I"Modified Julian Day Number;T@o; ;[I"FThe modified Julian day number is in elapsed days since midnight ;TI"B(Coordinated Universal Time) on November 17, 1858 CE (in the ;TI"Gregorian calendar).;T@o; ;[ I"FIn this document, the astronomical modified Julian day number is ;TI"Bthe same as the original modified Julian day number. And the ;TI"Dchronological modified Julian day number is a variation of the ;TI"Emodified Julian day number. Its days begin at midnight on local ;TI" time.;T@o; ;[I"IIn this document, when the term "modified Julian day number" simply ;TI"Cappears, it just refers to "chronological modified Julian day ;TI"number", not the original.;T@o; ;[I"
#
;TI"Date.jd(2451944) ;TI"" #=> #
;TI"Date.ordinal(2001,34) ;TI"" #=> #
;TI"Date.commercial(2001,5,6) ;TI"" #=> #
;TI"Date.parse('2001-02-03') ;TI"" #=> #
;TI"-Date.strptime('03-02-2001', '%d-%m-%Y') ;TI"" #=> #
;TI" Time.new(2001,2,3).to_date ;TI"" #=> #
;T:@format0o; ;[I"DAll date objects are immutable; hence cannot modify themselves.;T@o; ;[I"@The concept of a date object can be represented as a tuple ;TI"Aof the day count, the offset and the day of calendar reform.;T@o; ;[I"?The day count denotes the absolute position of a temporal ;TI"Ddimension. The offset is relative adjustment, which determines ;TI"@decoded local time with the day count. The day of calendar ;TI"Breform denotes the start day of the new style. The old style ;TI"=of the West is the Julian calendar which was adopted by ;TI"CCaesar. The new style is the Gregorian calendar, which is the ;TI".current civil calendar of many countries.;T@o; ;[I"DThe day count is virtually the astronomical Julian day number. ;TI"=The offset in this class is usually zero, and cannot be ;TI"specified directly.;T@o; ;[ I"=A Date object can be created with an optional argument, ;TI">the day of calendar reform as a Julian day number, which ;TI"Ashould be 2298874 to 2426355 or negative/positive infinity. ;TI">The default value is +Date::ITALY+ (2299161=1582-10-15). ;TI"See also sample/cal.rb.;T@o;;[I"($ ruby sample/cal.rb -c it 10 1582 ;TI" October 1582 ;TI" S M Tu W Th F S ;TI" 1 2 3 4 15 16 ;TI"17 18 19 20 21 22 23 ;TI"24 25 26 27 28 29 30 ;TI"31 ;TI" ;TI"($ ruby sample/cal.rb -c gb 9 1752 ;TI" September 1752 ;TI" S M Tu W Th F S ;TI" 1 2 14 15 16 ;TI"17 18 19 20 21 22 23 ;TI"24 25 26 27 28 29 30 ;T;0o; ;[I";A Date object has various methods. See each reference.;T@o;;[ I"$d = Date.parse('3rd Feb 2001') ;TI"> #=> #
;TI"+d.year #=> 2001 ;TI"(d.mon #=> 2 ;TI"(d.mday #=> 3 ;TI"(d.wday #=> 6 ;TI">d += 1 #=> #
;TI"7d.strftime('%a %d %b %Y') #=> "Sun 04 Feb 2001";T;0: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0o;;[ ;I"ext/date/lib/date.rb;T;0o;;[ ;I""ext/json/lib/json/add/date.rb;T;0;0;0[ [ U:RDoc::Constant[i I"MONTHNAMES;TI"Date::MONTHNAMES;T:public0o;;[o; ;[I"DAn array of strings of full month names in English. The first ;TI"element is nil.;T;@¶;0@¶@cRDoc::NormalClass0U;[i I"ABBR_MONTHNAMES;TI"Date::ABBR_MONTHNAMES;T;0o;;[o; ;[I"EAn array of strings of abbreviated month names in English. The ;TI"first element is nil.;T;@¶;0@¶@@É0U;[i I" DAYNAMES;TI"Date::DAYNAMES;T;0o;;[o; ;[I"KAn array of strings of the full names of days of the week in English. ;TI"The first is "Sunday".;T;@¶;0@¶@@É0U;[i I"ABBR_DAYNAMES;TI"Date::ABBR_DAYNAMES;T;0o;;[o; ;[I"CAn array of strings of abbreviated day names in English. The ;TI"first is "Sun".;T;@¶;0@¶@@É0U;[i I" ITALY;TI"Date::ITALY;T;0o;;[o; ;[I"CThe Julian day number of the day of calendar reform for Italy ;TI"!and some catholic countries.;T;@¶;0@¶@@É0U;[i I"ENGLAND;TI"Date::ENGLAND;T;0o;;[o; ;[I"EThe Julian day number of the day of calendar reform for England ;TI"and her colonies.;T;@¶;0@¶@@É0U;[i I"JULIAN;TI"Date::JULIAN;T;0o;;[o; ;[I"AThe Julian day number of the day of calendar reform for the ;TI"proleptic Julian calendar.;T;@¶;0@¶@@É0U;[i I"GREGORIAN;TI"Date::GREGORIAN;T;0o;;[o; ;[I"AThe Julian day number of the day of calendar reform for the ;TI""proleptic Gregorian calendar.;T;@¶;0@¶@@É0[[I"Comparable;To;;[ ;@¶;0I"ext/date/date_core.c;T[[I" class;T[[;[0[I"_httpdate;T@[I" _iso8601;T@[I"_jisx0301;T@[I"_parse;T@[I" _rfc2822;T@[I" _rfc3339;T@[I"_rfc822;T@[I"_strptime;T@[I"_xmlschema;T@[I" civil;T@[I"commercial;T@[I"gregorian_leap?;T@[I" httpdate;T@[I"iso8601;T@[I"jd;T@[I" jisx0301;T@[I"json_create;TI""ext/json/lib/json/add/date.rb;T[I"julian_leap?;T@[I" leap?;T@[I"new;T@[I" new!;T@[I" nth_kday;T@[I"ordinal;T@[I" parse;T@[I"rfc2822;T@[I"rfc3339;T@[I"rfc822;T@[I" strptime;T@[I" test_all;T@[I"test_civil;T@[I"test_commercial;T@[I"test_nth_kday;T@[I"test_ordinal;T@[I"test_unit_conv;T@[I"test_weeknum;T@[I" today;T@[I"valid_civil?;T@[I"valid_commercial?;T@[I"valid_date?;T@[I"valid_jd?;T@[I"valid_ordinal?;T@[I"weeknum;T@[I"xmlschema;T@[:protected[ [:private[ [I" instance;T[[;[P[I"+;T@[I"-;T@[I"<<;T@[I"<=>;T@[I"===;T@[I">>;T@[I"ajd;T@[I" amjd;T@[I"as_json;T@>[I"asctime;T@[I" ctime;T@[I" cwday;T@[I" cweek;T@[I"cwyear;T@[I"day;T@[I"day_fraction;T@[I"downto;T@[I"england;T@[I" fill;T@[I"friday?;T@[I"gregorian;T@[I"gregorian?;T@[I" httpdate;T@[I"infinite?;TI"ext/date/lib/date.rb;T[I"inspect;T@[I"inspect_raw;T@[I"iso8601;T@[I" italy;T@[I"jd;T@[I" jisx0301;T@[I"julian;T@[I"julian?;T@[I"ld;T@[I" leap?;T@[I"marshal_dump_old;T@[I" mday;T@[I"min;T@[I"minute;T@[I"mjd;T@[I"mon;T@[I"monday?;T@[I" month;T@[I"new_start;T@[I" next;T@[I" next_day;T@[I"next_month;T@[I"next_year;T@[I"nth_kday?;T@[I" prev_day;T@[I"prev_month;T@[I"prev_year;T@[I"rfc2822;T@[I"rfc3339;T@[@R@[I"saturday?;T@[I"sec;T@[I"second;T@[I" start;T@[I" step;T@[I" strftime;T@[I" succ;T@[I"sunday?;T@[I"thursday?;T@[I"to_date;T@[I"to_datetime;T@[I"to_json;T@>[I" to_s;T@[I"to_time;T@[I" tuesday?;T@[I" upto;T@[I" wday;T@[I"wednesday?;T@[I"xmlschema;T@[I" yday;T@[I" year;T@[;[ [;[[I" hour;T@[I" wnum0;T@[I" wnum1;T@[ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@¶@¹@¼@¼cRDoc::TopLevel