{"id":23347,"library":"beautiful-date","title":"Beautiful Date","description":"A Python library providing a simple and beautiful way to create date and datetime objects using natural language-like expressions. Current version 2.3.0, requires Python >=3.5. Release cadence is low, with occasional updates. Maintained by kuzmoyev.","status":"active","version":"2.3.0","language":"python","source_language":"en","source_url":"https://github.com/kuzmoyev/beautiful-date","tags":["date","datetime","natural-language","date-creation","beautiful-date"],"install":[{"cmd":"pip install beautiful-date","lang":"bash","label":"Latest release"}],"dependencies":[{"reason":"Used internally for date parsing","package":"python-dateutil","optional":true},{"reason":"For timezone support","package":"pytz","optional":true}],"imports":[{"note":"importing the module directly gives access to the function; the correct usage is to import the function explicitly.","wrong":"import beautiful_date","symbol":"beautiful_date","correct":"from beautiful_date import beautiful_date"},{"note":"","wrong":"","symbol":"beautiful_time","correct":"from beautiful_date import beautiful_time"},{"note":"","wrong":"","symbol":"beautiful_datetime","correct":"from beautiful_date import beautiful_datetime"},{"note":"Aliasing is common but not required.","wrong":"","symbol":"beautiful","correct":"from beautiful_date import beautiful_date as bd"}],"quickstart":{"code":"from beautiful_date import beautiful_date as bd\nprint(bd.January(1, 2023))\nprint(bd.today())\nprint(bd.now())","lang":"python","description":"Creates date objects using month names. bd.January(1, 2023) returns a datetime.date(2023,1,1)."},"warnings":[{"fix":"Use standard date methods or cast to datetime if needed.","message":"beautiful_date returns datetime.date objects, not custom types. Do not expect additional methods beyond standard date methods.","severity":"gotcha","affected_versions":"all"},{"fix":"Always use English month names (January, February, etc.).","message":"Month names are English only. Locale or non-English month names will raise AttributeError.","severity":"gotcha","affected_versions":"all"},{"fix":"Use beautiful_date for dates; for times, construct datetime.time manually.","message":"beautiful_time and beautiful_datetime are deprecated in favor of using beautiful_date with datetime.time objects.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use: from beautiful_date import beautiful_date","cause":"Importing the module incorrectly. The function is inside the module but imported as a symbol.","error":"AttributeError: module 'beautiful_date' has no attribute 'beautiful_date'"},{"fix":"Correct import: from beautiful_date import beautiful_date as bd; then use bd.January(...)","cause":"Trying to use month names directly after importing the module without importing the function.","error":"AttributeError: module 'beautiful_date' has no attribute 'January'"},{"fix":"Check the day number is valid for the month. For February, days 1-28 (or 29 in leap year).","cause":"Passing invalid day number for given month, e.g., February 30.","error":"ValueError: day is out of range for month"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}