本文简要介绍ruby语言中  DateTime.jisx0301  的用法。
用法
jisx0301(string='-4712-01-01T00:00:00+00:00'[, start=Date::ITALY], limit: 128) → datetime
根据一些典型的 JIS X 0301 格式,通过从字符串中解析来创建一个新的  DateTime  对象。
DateTime.jisx0301('H13.02.03T04:05:06+07:00')
                          #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
对于no-era 年,传统格式假定为平成。
DateTime.jisx0301('13.02.03T04:05:06+07:00')
                          #=> #<DateTime: 2001-02-03T04:05:06+07:00 ...>
当字符串长度超过 limit 时,引发  ArgumentError  。您可以通过传递 ‘limit: nil’ 来停止此检查,但请注意,解析可能需要很长时间。
相关用法
- Ruby DateTime.jd用法及代码示例
 - Ruby DateTime.hour用法及代码示例
 - Ruby DateTime.zone用法及代码示例
 - Ruby DateTime.second用法及代码示例
 - Ruby DateTime.second_fraction用法及代码示例
 - Ruby DateTime.sec用法及代码示例
 - Ruby DateTime.xmlschema用法及代码示例
 - Ruby DateTime.iso8601用法及代码示例
 - Ruby DateTime.now用法及代码示例
 - Ruby DateTime.ordinal用法及代码示例
 - Ruby DateTime.rfc3339用法及代码示例
 - Ruby DateTime.httpdate用法及代码示例
 - Ruby DateTime.rfc2822用法及代码示例
 - Ruby DateTime.minute用法及代码示例
 - Ruby DateTime.strftime用法及代码示例
 - Ruby DateTime.sec_fraction用法及代码示例
 - Ruby DateTime.new_offset用法及代码示例
 - Ruby DateTime.civil用法及代码示例
 - Ruby DateTime.parse用法及代码示例
 - Ruby DateTime.to_s用法及代码示例
 - Ruby DateTime.min用法及代码示例
 - Ruby DateTime.commercial用法及代码示例
 - Ruby DateTime.strptime用法及代码示例
 - Ruby DateTime.offset用法及代码示例
 - Ruby DateTime jisx0301()用法及代码示例
 
注:本文由纯净天空筛选整理自ruby-lang.org大神的英文原创作品 DateTime.jisx0301。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
