| Server IP : 68.178.247.200 / Your IP : 216.73.217.108 Web Server : Apache System : Linux p3plzcpnl489463.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64 User : x9dppmxs4rgd ( 8559391) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/root/opt/alt/ruby32/share/gems/doc/json-2.16.0/ri/DateTime/ |
Upload File : |
U:RDoc::AnyMethod[iI"as_json:ETI"DateTime#as_json;TF:publico:RDoc::Markup::Document:@parts[
o:RDoc::Markup::Paragraph; [I"NMethods <tt>DateTime#as_json</tt> and +DateTime.json_create+ may be used ;TI"6to serialize and deserialize a \DateTime object; ;TI"Dsee Marshal[https://docs.ruby-lang.org/en/master/Marshal.html].;To:RDoc::Markup::BlankLine o;
; [I":\Method <tt>DateTime#as_json</tt> serializes +self+, ;TI"4returning a 2-element hash representing +self+:;T@o:RDoc::Markup::Verbatim; [I"!require 'json/add/datetime'
;TI"x = DateTime.now.as_json
;TI"S# => {"json_class"=>"DateTime", "y"=>2023, "m"=>11, "d"=>21, "sg"=>2299161.0}
;T:@format0o;
; [I"R\Method +JSON.create+ deserializes such a hash, returning a \DateTime object:;T@o;; [I"EDateTime.json_create(x) # BUG? Raises Date::Error "invalid date";T;
0:
@fileI"lib/json/add/date_time.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*);T@ FI"
DateTime;TcRDoc::NormalClass00