{
 "kind": "tool",
 "slug": "python-dateutil",
 "path": "tools/python-dateutil/",
 "name": "python-dateutil",
 "maker": null,
 "density": "full",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Utilities",
   "tools/utilities/"
  ]
 ],
 "lead": "Read dates and do calendar math in Python.",
 "chips": [
  {
   "label": "Utilities",
   "path": "tools/utilities/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install python-dateutil"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/dateutil/dateutil"
  },
  {
   "label": "Website",
   "href": "https://github.com/dateutil/dateutil"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "BSD-3-Clause",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": "All contributions after December 1, 2017 released under dual license - either Apache 2.0 License or the BSD 3-Clause License",
   "note": "Paid and closed-source use is allowed under BSD-3-Clause (and Apache-2.0 for newer code).",
   "src": "https://dateutil.readthedocs.io/en/stable/"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 18, 2026",
   "note": "Latest GitHub release Nov 1, 2026. ",
   "src": "https://github.com/dateutil/dateutil"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "100 projects",
   "status": "info",
   "sub": "#11 of 408 in its category",
   "note": "Dependency in 100 public GitHub projects set up for AI coding agents that we scanned (1.6%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily; card checked Nov 10, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What python-dateutil does",
   "parts": [
    {
     "t": "prose",
     "text": "python-dateutil is a free add-on for Python's own date and time tools. Your app can read dates typed in many formats and add months without landing on a day that does not exist. It can also list repeating dates like \"last workday of each month\" and show a time in another city's time zone."
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Read dates people type",
       "text": "A form, an email or an imported spreadsheet gives \"March 3rd, 2027 at 4:30pm\" or \"03/04/2027 9am\". Your app turns each into a real date it can sort and store.",
       "idea": false
      },
      {
       "title": "Monthly billing on the 31st",
       "text": "A customer subscribes on January 31; each renewal falls on the last day of shorter months instead of skipping into March.",
       "idea": false
      },
      {
       "title": "Repeating dates for payouts",
       "text": "Payouts, reports or reminders happen on \"the last workday of each month\" or \"every second Tuesday\"; your app lists the next dates from one rule.",
       "idea": false
      },
      {
       "title": "One meeting time for every city",
       "text": "A booking page shows a call set for 15:00 in Berlin as the matching local time in New York and Tokyo, with summer time handled.",
       "idea": false
      },
      {
       "title": "Repeat rules from calendar files",
       "text": "A calendar export says \"FREQ=WEEKLY;BYDAY=TU;COUNT=3\"; your app turns that rule into the actual meeting dates.",
       "idea": false
      },
      {
       "title": "Age or time as a member",
       "text": "A profile page shows \"member for 2 years, 3 months\" or checks that a user is at least 18 from the birth date.",
       "idea": false
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "python-dateutil popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "74",
       "of": "/ 100",
       "l": "Gid Score, #254 overall"
      },
      {
       "n": "287M",
       "l": "downloads a week, pypi"
      },
      {
       "n": "2,646",
       "l": "GitHub stars"
      },
      {
       "n": "100",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How python-dateutil is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "python-dateutil is a dependency in 100 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (6.2% of the 1,623 Python ones), #11 of 408 in utilities.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,483; those are left out of every share on this page.",
      "Projects that use it most often also use Requests (69.0%), NumPy (66.0%), Pydantic (65.0%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "56 projects, 1.7%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "41 projects, 1.4%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "39 projects, 1.6%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "9 projects, 2.7%",
       "v": "OpenClaw",
       "path": "agents/openclaw/"
      },
      {
       "l": "5 projects, 1.8%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      },
      {
       "l": "5 projects, 1.1%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "5 projects, 1.1%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 69.0% of its projects",
       "v": "Requests",
       "path": "tools/requests-py/"
      },
      {
       "l": "In 66.0% of its projects",
       "v": "NumPy",
       "path": "tools/numpy/"
      },
      {
       "l": "In 65.0% of its projects",
       "v": "Pydantic",
       "path": "tools/pydantic/"
      },
      {
       "l": "In 55.0% of its projects",
       "v": "pandas",
       "path": "tools/pandas/"
      },
      {
       "l": "In 53.0% of its projects",
       "v": "python-dotenv",
       "path": "tools/python-dotenv/"
      },
      {
       "l": "In 52.0% of its projects",
       "v": "Uvicorn",
       "path": "tools/uvicorn/"
      },
      {
       "l": "In 50.0% of its projects",
       "v": "PyYAML",
       "path": "tools/pyyaml/"
      },
      {
       "l": "In 50.0% of its projects",
       "v": "urllib3",
       "path": "tools/urllib3/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about python-dateutil",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "More in Utilities",
       "path": "tools/utilities/",
       "items": [
        {
         "text": "clsx",
         "path": "tools/clsx/"
        },
        {
         "text": "date-fns",
         "path": "tools/date-fns/"
        },
        {
         "text": "PyYAML",
         "path": "tools/pyyaml/"
        },
        {
         "text": "uuid",
         "path": "tools/uuid/"
        },
        {
         "text": "yaml",
         "path": "tools/yaml/"
        },
        {
         "text": "js-yaml",
         "path": "tools/js-yaml/"
        },
        {
         "text": "glob",
         "path": "tools/glob/"
        },
        {
         "text": "Lodash",
         "path": "tools/lodash/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "python-dateutil",
       "me": true,
       "facts": [
        "BSD-3-Clause",
        "Gid 74",
        "287M/wk"
       ]
      },
      {
       "name": "dateparser",
       "why": "Pick dateparser when users write dates in plain words or in other languages, like \"in two days\", which dateutil does not read.",
       "path": "tools/dateparser/",
       "facts": []
      },
      {
       "name": "Pendulum",
       "why": "Pick Pendulum when you want one date object that handles time zones for you, instead of adding pieces to Python's own dates.",
       "path": "tools/pendulum/",
       "facts": []
      },
      {
       "name": "Arrow",
       "why": "Pick Arrow for a friendlier, all-in-one way to create, format and convert dates in Python.",
       "path": "tools/arrow/",
       "facts": []
      }
     ],
     "more": "Compare python-dateutil with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Use python-dateutil (pin python-dateutil==4.0.0, Python 3.11+) to parse the dates users type with dayfirst set for our locale, compute monthly renewal dates by adding relativedelta(months=n) to the original start date, and convert meeting times with tz.gettz."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Install it under its package name python-dateutil; in code you import dateutil.",
       "code": "pip install python-dateutil",
       "src": "https://dateutil.readthedocs.io/en/stable/"
      },
      {
       "text": "Read a date from text. Missing parts come from a default date you pass in.",
       "code": ">>> from dateutil.parser import parse\n>>> parse(\"Today is January 1, 2047 at 8:21:00AM\", fuzzy_with_tokens=True)\n(datetime.datetime(2047, 1, 1, 8, 21), (u'Today is ', u' ', u'at '))\n",
       "src": "https://dateutil.readthedocs.io/en/stable/parser.html"
      },
      {
       "text": "Add months, weeks or a weekday to a date with relativedelta.",
       "code": ">>> NOW + relativedelta(months=+1, weeks=+1)\ndatetime.datetime(2003, 10, 24, 20, 54, 47, 282310)\n",
       "src": "https://dateutil.readthedocs.io/en/stable/relativedelta.html"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "pip install dateutil",
       "fix": "pip install python-dateutil==4.0.0, then import dateutil in code",
       "why": "The package name and the import name differ."
      },
      {
       "dont": "next = previous + relativedelta(months=1) in a loop, starting from January 31",
       "fix": "next = start + relativedelta(months=n) from the original start date",
       "why": "Adding to the previous result drifts: in our run the chain gave Feb 28, then Mar 28 and Apr 28 instead of Mar 31 and Apr 30."
      },
      {
       "dont": "isoparse(\"20200728121240\") or other squeezed digits without separators",
       "fix": "Send full ISO strings such as 2020-07-28T12:12:40Z, or use parser.parse for loose input",
       "why": "Since 4.0 isoparse needs each field to have exactly the expected digits; our run raised ValueError: Expected 2 digits."
      },
      {
       "dont": "parse(\"03/04/2027\") for European users",
       "fix": "parse(\"03/04/2027\", dayfirst=True), or ask for an unambiguous format such as 2027-04-03",
       "why": "By default the first number is the month, so our run read it as March 4, not April 3."
      },
      {
       "dont": "Storing parse(\"March 3 2027 4pm\") as is and comparing it with dates that have a time zone",
       "fix": "Attach the user's zone (dt.replace(tzinfo=tz.gettz(user_zone))) or pass a default with a zone before you store it",
       "why": "Text without a zone gives a date with no zone, and Python refuses to compare it with zoned dates."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Why does pip install dateutil not work?",
       "a": "The package is called python-dateutil; only the name you import in code is dateutil.",
       "evidence": {
        "url": "https://dateutil.readthedocs.io/en/stable/",
        "quote": "dateutil can be installed from PyPI using pip (note that the package name is different from the importable name)"
       }
      },
      {
       "q": "What happens when I add one month to January 31?",
       "a": "You get the last day of February. Adding months never jumps past the end of the shorter month.",
       "evidence": {
        "url": "https://dateutil.readthedocs.io/en/stable/relativedelta.html",
        "quote": "Notice that adding one month will never cross the month boundary."
       }
      },
      {
       "q": "Does a parsed date know its time zone?",
       "a": "Only if the text has one. Without a zone you get a date with no time zone attached.",
       "evidence": {
        "url": "https://dateutil.readthedocs.io/en/stable/parser.html",
        "quote": "If a time zone is omitted, a timezone-naive datetime is returned."
       }
      },
      {
       "q": "Can I use it in a paid product?",
       "a": "Yes. It is under BSD-3-Clause, and newer code also under Apache-2.0; keep the copyright notice in copies you ship.",
       "evidence": {
        "url": "https://dateutil.readthedocs.io/en/stable/",
        "quote": "All contributions after December 1, 2017 released under dual license - either Apache 2.0 License or the BSD 3-Clause License"
       }
      },
      {
       "q": "Is the project still maintained?",
       "a": "Yes. Version 4.0.0 came out on 2026-11-01, eleven days after 3.0.0.",
       "evidence": {
        "url": "https://github.com/dateutil/dateutil/blob/master/NEWS",
        "quote": "Version 4.0.0 (2026-11-01)"
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi python-dateutil"
  ],
  [
   "Category",
   "Utilities"
  ],
  [
   "License",
   "BSD-3-Clause"
  ],
  [
   "Gid Score",
   "73.5"
  ],
  [
   "Rank in category",
   "#11 of 408"
  ],
  [
   "GitHub",
   "dateutil/dateutil"
  ],
  [
   "Last change",
   "Nov 18, 2026"
  ]
 ],
 "good": [
  "Version 4 needs Python 3.11 or newer. The 3.0 line is the last one for older Python and gets only serious fixes.",
  "Since version 3.0 the world time zone data comes from your system or the separate tzdata package, so keep that package up to date.",
  "Versions 3.0 and 4.0 both came out in autumn 2026 after a long pause, and both change some results; read the change log before you upgrade an older app."
 ],
 "checked_line": "Read by AgentGid from 11 official pages, card checked Nov 10, 2026; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/dateutil.png"
}