Flowdock
method

_iso8601

Importance_0
_iso8601(str) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/date/format.rb, line 1096
  def self._iso8601(str) # :nodoc:
    if /\A\s*(([-+]?\d{2,}|-)-\d{2}-\d{2}|
              ([-+]?\d{2,})?-\d{3}|
              (\d{2}|\d{4})?-w\d{2}-\d|
              -w-\d)
        (t
        \d{2}:\d{2}(:\d{2}([,.]\d+)?)?
        (z|[-+]\d{2}(:?\d{2})?)?)?\s*\z/x =~ str
      _parse(str)
    elsif /\A\s*(([-+]?(\d{2}|\d{4})|--)\d{2}\d{2}|
              ([-+]?(\d{2}|\d{4}))?\d{3}|-\d{3}|
              (\d{2}|\d{4})?w\d{2}\d)
        (t?
        \d{2}\d{2}(\d{2}([,.]\d+)?)?
        (z|[-+]\d{2}(\d{2})?)?)?\s*\z/x =~ str
      _parse(str)
    elsif /\A\s*(\d{2}:\d{2}(:\d{2}([,.]\d+)?)?
        (z|[-+]\d{2}(:?\d{2})?)?)?\s*\z/x =~ str
      _parse(str)
    elsif /\A\s*(\d{2}\d{2}(\d{2}([,.]\d+)?)?
        (z|[-+]\d{2}(\d{2})?)?)?\s*\z/x =~ str
      _parse(str)
    end
  end
Register or log in to add new notes.