docstr: Parse an ISO-8601 datetime string into a :class:`datetime.datetime`.
  
  An ISO-8601 datetime string consists of a date portion, followed
  optionally by a time portion - the date and time portions are separated
  by a single character separator, which is ``T`` in the official
  standard. Incomplete date formats (such as ``YYYY-MM``) may *not* be
  combined with a time portion.
  
  Supported date formats are:
  
  Common:
  
  - ``YYYY``
  - ``YYYY-MM`` or ``YYYYMM``
  - ``YYYY-MM-DD`` or ``YYYYMMDD``
  
  Uncommon:
  
  - ``YYYY-Www`` or ``YYYYWww`` - ISO week (day defaults to 0)
  - ``YYYY-Www-D`` or ``YYYYWwwD`` - ISO week and day
  
  The ISO week and day numbering follows the same logic as
  :func:`datetime.date.isocalendar`.
  
  Supported time formats are:
  
  - ``hh``
  - ``hh:mm`` or ``hhmm``
  - ``hh:mm:ss`` or ``hhmmss``
  - ``hh:mm:ss.ssssss`` (Up to 6 sub-second digits)
  
  Midnight is a special case for `hh`, as the standard supports both
  00:00 and 24:00 as a representation. The decimal separator can be
  either a dot or a comma.
  
  
  .. caution::
  
      Support for fractional components other than seconds is part of the
      ISO-8601 standard, but is not currently implemented in this parser.
  
  Supported time zone offset formats are:
  
  - `Z` (UTC)
  - `±HH:MM`
  - `±HHMM`
  - `±HH`
  
  Offsets will be represented as :class:`dateutil.tz.tzoffset` objects,
  with the exception of UTC, which will be represented as
  :class:`dateutil.tz.tzutc`. Time zone offsets equivalent to UTC (such
  as `+00:00`) will also be represented as :class:`dateutil.tz.tzutc`.
  
  :param dt_str:
      A string or stream containing only an ISO-8601 datetime string
  
  :return:
      Returns a :class:`datetime.datetime` representing the string.
      Unspecified components default to their lowest value.
  
  .. warning::
  
      As of version 2.7.0, the strictness of the parser should not be
      considered a stable part of the contract. Any valid ISO-8601 string
      that parses correctly with the default settings will continue to
      parse correctly in future versions, but invalid strings that
      currently fail (e.g. ``2017-01-01T00:00+00:00:00``) are not
      guaranteed to continue failing in future versions if they encode
      a valid date.
  
  .. versionadded:: 2.7.0
docstr_tok: ["Parse","an","ISO-8601","datetime","string","into","a",":","class",":","`","datetime.datetime","`",".","An","ISO-8601","datetime","string","consists","of","a","date","portion",",","followed","optionally","by","a","time","portion","-","the","date","and","time","portions","are","separated","by","a","single","character","separator",",","which","is","``","T","``","in","the","official","standard",".","Incomplete","date","formats","(","such","as","``","YYYY-MM","``",")","may","*","not","*","be","combined","with","a","time","portion",".","Supported","date","formats","are",":","Common",":","-","``","YYYY","``","-","``","YYYY-MM","``","or","``","YYYYMM","``","-","``","YYYY-MM-DD","``","or","``","YYYYMMDD","``","Uncommon",":","-","``","YYYY-Www","``","or","``","YYYYWww","``","-","ISO","week","(","day","defaults","to","0",")","-","``","YYYY-Www-D","``","or","``","YYYYWwwD","``","-","ISO","week","and","day","The","ISO","week","and","day","numbering","follows","the","same","logic","as",":","func",":","`","datetime.date.isocalendar","`",".","Supported","time","formats","are",":","-","``","hh","``","-","``","hh",":","mm","``","or","``","hhmm","``","-","``","hh",":","mm",":","ss","``","or","``","hhmmss","``","-","``","hh",":","mm",":","ss.ssssss","``","(","Up","to","6","sub-second","digits",")","Midnight","is","a","special","case","for","`","hh","`",",","as","the","standard","supports","both","00:00","and","24:00","as","a","representation",".","The","decimal","separator","can","be","either","a","dot","or","a","comma",".","..","caution",":",":","Support","for","fractional","components","other","than","seconds","is","part","of","the","ISO-8601","standard",",","but","is","not","currently","implemented","in","this","parser",".","Supported","time","zone","offset","formats","are",":","-","`","Z","`","(","UTC",")","-","`","\u00b1HH",":","MM","`","-","`","\u00b1HHMM","`","-","`","\u00b1HH","`","Offsets","will","be","represented","as",":","class",":","`","dateutil.tz.tzoffset","`","objects",",","with","the","exception","of","UTC",",","which","will","be","represented","as",":","class",":","`","dateutil.tz.tzutc","`",".","Time","zone","offsets","equivalent","to","UTC","(","such","as","`","+00:00","`",")","will","also","be","represented","as",":","class",":","`","dateutil.tz.tzutc","`",".",":","param","dt_str",":","A","string","or","stream","containing","only","an","ISO-8601","datetime","string",":","return",":","Returns","a",":","class",":","`","datetime.datetime","`","representing","the","string",".","Unspecified","components","default","to","their","lowest","value",".","..","warning",":",":","As","of","version","2.7.0",",","the","strictness","of","the","parser","should","not","be","considered","a","stable","part","of","the","contract",".","Any","valid","ISO-8601","string","that","parses","correctly","with","the","default","settings","will","continue","to","parse","correctly","in","future","versions",",","but","invalid","strings","that","currently","fail","(","e.g",".","``","2017-01-01T00:00+00:00:00","``",")","are","not","guaranteed","to","continue","failing","in","future","versions","if","they","encode","a","valid","date",".","..","versionadded",":",":","2.7.0"]
code: def isoparse(self, dt_str):
      """
      Parse an ISO-8601 datetime string into a :class:`datetime.datetime`.
  
      An ISO-8601 datetime string consists of a date portion, followed
      optionally by a time portion - the date and time portions are separated
      by a single character separator, which is ``T`` in the official
      standard. Incomplete date formats (such as ``YYYY-MM``) may *not* be
      combined with a time portion.
  
      Supported date formats are:
  
      Common:
  
      - ``YYYY``
      - ``YYYY-MM`` or ``YYYYMM``
      - ``YYYY-MM-DD`` or ``YYYYMMDD``
  
      Uncommon:
  
      - ``YYYY-Www`` or ``YYYYWww`` - ISO week (day defaults to 0)
      - ``YYYY-Www-D`` or ``YYYYWwwD`` - ISO week and day
  
      The ISO week and day numbering follows the same logic as
      :func:`datetime.date.isocalendar`.
  
      Supported time formats are:
  
      - ``hh``
      - ``hh:mm`` or ``hhmm``
      - ``hh:mm:ss`` or ``hhmmss``
      - ``hh:mm:ss.ssssss`` (Up to 6 sub-second digits)
  
      Midnight is a special case for `hh`, as the standard supports both
      00:00 and 24:00 as a representation. The decimal separator can be
      either a dot or a comma.
  
  
      .. caution::
  
          Support for fractional components other than seconds is part of the
          ISO-8601 standard, but is not currently implemented in this parser.
  
      Supported time zone offset formats are:
  
      - `Z` (UTC)
      - `±HH:MM`
      - `±HHMM`
      - `±HH`
  
      Offsets will be represented as :class:`dateutil.tz.tzoffset` objects,
      with the exception of UTC, which will be represented as
      :class:`dateutil.tz.tzutc`. Time zone offsets equivalent to UTC (such
      as `+00:00`) will also be represented as :class:`dateutil.tz.tzutc`.
  
      :param dt_str:
          A string or stream containing only an ISO-8601 datetime string
  
      :return:
          Returns a :class:`datetime.datetime` representing the string.
          Unspecified components default to their lowest value.
  
      .. warning::
  
          As of version 2.7.0, the strictness of the parser should not be
          considered a stable part of the contract. Any valid ISO-8601 string
          that parses correctly with the default settings will continue to
          parse correctly in future versions, but invalid strings that
          currently fail (e.g. ``2017-01-01T00:00+00:00:00``) are not
          guaranteed to continue failing in future versions if they encode
          a valid date.
  
      .. versionadded:: 2.7.0
      """
      components, pos = self._parse_isodate(dt_str)
  
      if len(dt_str) > pos:
          if self._sep is None or dt_str[pos : pos + 1] == self._sep:
              components += self._parse_isotime(dt_str[pos + 1 :])
          else:
              raise ValueError("String contains unknown ISO components")
  
      if len(components) > 3 and components[3] == 24:
          components[3] = 0
          return datetime(*components) + timedelta(days=1)
  
      return datetime(*components)
  
file_path: catboost/contrib/python/python-dateutil/py3/dateutil/parser/isoparser.py
imports: from datetime import datetime, timedelta, time, date
  import calendar
  from dateutil import tz
  from functools import wraps
  import re
  import six
label_desc: Use image node_id 2 for calling the isoparser obj's underlying member method code with example usage: obj.isoparse(dt_str) and returns: datetime, unknown