[{"data":1,"prerenderedAt":4214},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/get-current-datetime":601},[4,22,31,40,49,58,67,76,86,94,103,112,121,130,139,148,158,167,176,185,194,203,212,222,231,240,249,258,267,276,285,297,306,315,324,333,342,351,362,371,380,389,398,407,418,427,436,445,454,463,472,483,492,501,510,519,528,539,548,557,566,575,584,593],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21,"expanded":13},"/python-how-to/string-manipulation","python-how-to",false,"","String Manipulation","Learn essential string manipulation techniques in Python","string-manipulation",1,true,"pi pi-folder","markdown","content:python-how-to:1.string-manipulation.md","content","python-how-to/1.string-manipulation.md","python-how-to/1.string-manipulation","md",[22,31,40,49,58,67],{"_path":23,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":15,"_id":28,"_source":17,"_file":29,"_stem":30,"_extension":20},"/python-how-to/split-join-strings","Split and Join Strings","Learn how to split strings into lists and join lists back into strings in Python","split-join-strings",2,"content:python-how-to:2.split-join-strings.md","python-how-to/2.split-join-strings.md","python-how-to/2.split-join-strings",{"_path":32,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":15,"_id":37,"_source":17,"_file":38,"_stem":39,"_extension":20},"/python-how-to/remove-whitespace","Remove Whitespace","Learn how to clean up and remove unwanted whitespace from strings in Python","remove-whitespace",3,"content:python-how-to:3.remove-whitespace.md","python-how-to/3.remove-whitespace.md","python-how-to/3.remove-whitespace",{"_path":41,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":15,"_id":46,"_source":17,"_file":47,"_stem":48,"_extension":20},"/python-how-to/find-replace-text","Find and Replace Text","Learn how to search for and replace text within strings in Python","find-replace-text",4,"content:python-how-to:4.find-replace-text.md","python-how-to/4.find-replace-text.md","python-how-to/4.find-replace-text",{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},"/python-how-to/check-string-content","Check String Content","Learn how to validate and check the content of strings in Python","check-string-content",5,"content:python-how-to:5.check-string-content.md","python-how-to/5.check-string-content.md","python-how-to/5.check-string-content",{"_path":59,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":15,"_id":64,"_source":17,"_file":65,"_stem":66,"_extension":20},"/python-how-to/format-strings","Format Strings","Learn how to format strings in Python using f-strings and format() method","format-strings",6,"content:python-how-to:6.format-strings.md","python-how-to/6.format-strings.md","python-how-to/6.format-strings",{"_path":68,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":69,"description":70,"slug":71,"parentId":5,"order":72,"_type":15,"_id":73,"_source":17,"_file":74,"_stem":75,"_extension":20},"/python-how-to/unicode-special-chars","Handle Unicode and Special Characters","Learn how to work with Unicode and special characters in Python strings","unicode-special-chars",7,"content:python-how-to:7.unicode-special-chars.md","python-how-to/7.unicode-special-chars.md","python-how-to/7.unicode-special-chars",{"_path":77,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":78,"description":79,"slug":80,"order":81,"isParent":13,"icon":14,"_type":15,"_id":82,"_source":17,"_file":83,"_stem":84,"_extension":20,"children":85,"expanded":13},"/python-how-to/list-operations","List Operations","Learn essential operations for working with lists in Python","list-operations",8,"content:python-how-to:8.list-operations.md","python-how-to/8.list-operations.md","python-how-to/8.list-operations",[86,94,103,112,121,130,139],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":81,"_type":15,"_id":91,"_source":17,"_file":92,"_stem":93,"_extension":20},"/python-how-to/sort-lists","Sort Lists","Learn how to sort lists in Python using different methods and custom sorting","sort-lists","content:python-how-to:9.sort-lists.md","python-how-to/9.sort-lists.md","python-how-to/9.sort-lists",{"_path":95,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":96,"description":97,"slug":98,"parentId":77,"order":99,"_type":15,"_id":100,"_source":17,"_file":101,"_stem":102,"_extension":20},"/python-how-to/remove-duplicates","Remove Duplicates","Learn how to remove duplicate elements from lists in Python","remove-duplicates",10,"content:python-how-to:10.remove-duplicates.md","python-how-to/10.remove-duplicates.md","python-how-to/10.remove-duplicates",{"_path":104,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":105,"description":106,"slug":107,"parentId":77,"order":108,"_type":15,"_id":109,"_source":17,"_file":110,"_stem":111,"_extension":20},"/python-how-to/filter-lists","Filter Lists","Learn how to filter lists in Python using different methods","filter-lists",11,"content:python-how-to:11.filter-lists.md","python-how-to/11.filter-lists.md","python-how-to/11.filter-lists",{"_path":113,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":114,"description":115,"slug":116,"parentId":77,"order":117,"_type":15,"_id":118,"_source":17,"_file":119,"_stem":120,"_extension":20},"/python-how-to/combine-lists","Combine Lists","Learn different methods to combine lists in Python","combine-lists",12,"content:python-how-to:12.combine-lists.md","python-how-to/12.combine-lists.md","python-how-to/12.combine-lists",{"_path":122,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":123,"description":124,"slug":125,"parentId":77,"order":126,"_type":15,"_id":127,"_source":17,"_file":128,"_stem":129,"_extension":20},"/python-how-to/list-comprehensions","Use List Comprehensions","Learn how to create and transform lists efficiently using Python's list comprehension syntax","list-comprehensions",13,"content:python-how-to:13.list-comprehensions.md","python-how-to/13.list-comprehensions.md","python-how-to/13.list-comprehensions",{"_path":131,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":132,"description":133,"slug":134,"parentId":77,"order":135,"_type":15,"_id":136,"_source":17,"_file":137,"_stem":138,"_extension":20},"/python-how-to/nested-lists","Work with Nested Lists","Learn how to work with nested lists (2D arrays) in Python","nested-lists",14,"content:python-how-to:14.nested-lists.md","python-how-to/14.nested-lists.md","python-how-to/14.nested-lists",{"_path":140,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":141,"description":142,"slug":143,"parentId":77,"order":144,"_type":15,"_id":145,"_source":17,"_file":146,"_stem":147,"_extension":20},"/python-how-to/enumerate-zip","Use enumerate() and zip()","Learn how to use enumerate() and zip() for efficient iteration in Python","enumerate-zip",15,"content:python-how-to:15.enumerate-zip.md","python-how-to/15.enumerate-zip.md","python-how-to/15.enumerate-zip",{"_path":149,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":150,"description":151,"slug":152,"order":153,"isParent":13,"icon":14,"_type":15,"_id":154,"_source":17,"_file":155,"_stem":156,"_extension":20,"children":157,"expanded":13},"/python-how-to/dictionary-operations","Dictionary Operations","Learn essential operations for working with dictionaries in Python","dictionary-operations",16,"content:python-how-to:16.dictionary-operations.md","python-how-to/16.dictionary-operations.md","python-how-to/16.dictionary-operations",[158,167,176,185,194,203],{"_path":159,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":160,"description":161,"slug":162,"parentId":149,"order":163,"_type":15,"_id":164,"_source":17,"_file":165,"_stem":166,"_extension":20},"/python-how-to/merge-dictionaries","Merge Dictionaries","Learn different methods to merge dictionaries in Python","merge-dictionaries",17,"content:python-how-to:17.merge-dictionaries.md","python-how-to/17.merge-dictionaries.md","python-how-to/17.merge-dictionaries",{"_path":168,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":169,"description":170,"slug":171,"parentId":149,"order":172,"_type":15,"_id":173,"_source":17,"_file":174,"_stem":175,"_extension":20},"/python-how-to/sort-dictionaries","Sort Dictionaries","Learn how to sort dictionaries by keys or values in Python","sort-dictionaries",18,"content:python-how-to:18.sort-dictionaries.md","python-how-to/18.sort-dictionaries.md","python-how-to/18.sort-dictionaries",{"_path":177,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":178,"description":179,"slug":180,"parentId":149,"order":181,"_type":15,"_id":182,"_source":17,"_file":183,"_stem":184,"_extension":20},"/python-how-to/filter-dictionaries","Filter Dictionaries","Learn how to filter dictionaries based on keys or values in Python","filter-dictionaries",19,"content:python-how-to:19.filter-dictionaries.md","python-how-to/19.filter-dictionaries.md","python-how-to/19.filter-dictionaries",{"_path":186,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":187,"description":188,"slug":189,"parentId":149,"order":190,"_type":15,"_id":191,"_source":17,"_file":192,"_stem":193,"_extension":20},"/python-how-to/handle-missing-keys","Handle Missing Keys","Learn safe ways to access dictionary keys and handle missing values","handle-missing-keys",20,"content:python-how-to:20.handle-missing-keys.md","python-how-to/20.handle-missing-keys.md","python-how-to/20.handle-missing-keys",{"_path":195,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":196,"description":197,"slug":198,"parentId":149,"order":199,"_type":15,"_id":200,"_source":17,"_file":201,"_stem":202,"_extension":20},"/python-how-to/dictionary-comprehensions","Use Dictionary Comprehensions","Learn how to create dictionaries efficiently using comprehensions","dictionary-comprehensions",21,"content:python-how-to:21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions",{"_path":204,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":205,"description":206,"slug":207,"parentId":149,"order":208,"_type":15,"_id":209,"_source":17,"_file":210,"_stem":211,"_extension":20},"/python-how-to/convert-lists-dictionaries","Convert Between Lists and Dictionaries","Learn how to transform data between lists and dictionaries in Python","convert-lists-dictionaries",22,"content:python-how-to:22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries",{"_path":213,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":214,"description":215,"slug":216,"order":217,"isParent":13,"icon":14,"_type":15,"_id":218,"_source":17,"_file":219,"_stem":220,"_extension":20,"children":221,"expanded":13},"/python-how-to/file-operations","File Operations","Learn essential file operations in Python for reading, writing, and managing files","file-operations",23,"content:python-how-to:23.file-operations.md","python-how-to/23.file-operations.md","python-how-to/23.file-operations",[222,231,240,249,258,267,276],{"_path":223,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":224,"description":225,"slug":226,"parentId":213,"order":227,"_type":15,"_id":228,"_source":17,"_file":229,"_stem":230,"_extension":20},"/python-how-to/read-text-files","Read Text Files","Learn how to read text files in Python using different methods","read-text-files",24,"content:python-how-to:24.read-text-files.md","python-how-to/24.read-text-files.md","python-how-to/24.read-text-files",{"_path":232,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":233,"description":234,"slug":235,"parentId":213,"order":236,"_type":15,"_id":237,"_source":17,"_file":238,"_stem":239,"_extension":20},"/python-how-to/write-to-files","Write to Files","Learn how to write and create files in Python using different methods","write-to-files",25,"content:python-how-to:25.write-to-files.md","python-how-to/25.write-to-files.md","python-how-to/25.write-to-files",{"_path":241,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":242,"description":243,"slug":244,"parentId":213,"order":245,"_type":15,"_id":246,"_source":17,"_file":247,"_stem":248,"_extension":20},"/python-how-to/work-csv-files","Work with CSV Files","Learn how to read and write CSV files in Python using the csv module","work-csv-files",26,"content:python-how-to:26.work-csv-files.md","python-how-to/26.work-csv-files.md","python-how-to/26.work-csv-files",{"_path":250,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":251,"description":252,"slug":253,"parentId":213,"order":254,"_type":15,"_id":255,"_source":17,"_file":256,"_stem":257,"_extension":20},"/python-how-to/handle-file-paths","Handle File Paths","Learn how to work with file and directory paths in Python using pathlib and os modules","handle-file-paths",27,"content:python-how-to:27.handle-file-paths.md","python-how-to/27.handle-file-paths.md","python-how-to/27.handle-file-paths",{"_path":259,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":260,"description":261,"slug":262,"parentId":213,"order":263,"_type":15,"_id":264,"_source":17,"_file":265,"_stem":266,"_extension":20},"/python-how-to/work-json-files","Work with JSON Files","Learn how to read and write JSON files in Python using the json module","work-json-files",28,"content:python-how-to:28.work-json-files.md","python-how-to/28.work-json-files.md","python-how-to/28.work-json-files",{"_path":268,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":269,"description":270,"slug":271,"parentId":213,"order":272,"_type":15,"_id":273,"_source":17,"_file":274,"_stem":275,"_extension":20},"/python-how-to/handle-binary-files","Handle Binary Files","Learn how to work with binary files in Python for images, data, and other non-text content","handle-binary-files",29,"content:python-how-to:29.handle-binary-files.md","python-how-to/29.handle-binary-files.md","python-how-to/29.handle-binary-files",{"_path":277,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":278,"description":279,"slug":280,"parentId":213,"order":281,"_type":15,"_id":282,"_source":17,"_file":283,"_stem":284,"_extension":20},"/python-how-to/use-context-managers","Use Context Managers","Learn how to use context managers for safe resource handling in Python","use-context-managers",30,"content:python-how-to:30.use-context-managers.md","python-how-to/30.use-context-managers.md","python-how-to/30.use-context-managers",{"_path":286,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":287,"description":288,"slug":289,"parentId":290,"order":291,"isParent":13,"icon":292,"_type":15,"_id":293,"_source":17,"_file":294,"_stem":295,"_extension":20,"children":296,"expanded":13},"/python-how-to/date-and-time","Date and Time","Master Python's date and time handling with datetime, time zones, formatting, and calculations","date-and-time","/python-how-to",31,"pi pi-calendar","content:python-how-to:31.date-and-time.md","python-how-to/31.date-and-time.md","python-how-to/31.date-and-time",[297,306,315,324,333,342],{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":286,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python-how-to/get-current-datetime","Get Current Date/Time","Learn how to get current date, time, and timestamps using Python's datetime module","get-current-datetime",32,"content:python-how-to:32.get-current-datetime.md","python-how-to/32.get-current-datetime.md","python-how-to/32.get-current-datetime",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":286,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python-how-to/format-dates","Format Dates","Master date formatting with strftime, custom formats, and locale-aware formatting for user-friendly displays","format-dates",33,"content:python-how-to:33.format-dates.md","python-how-to/33.format-dates.md","python-how-to/33.format-dates",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":286,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python-how-to/calculate-date-differences","Calculate Date Differences","Learn to calculate time differences, durations, and intervals using Python's timedelta for scheduling and analytics","calculate-date-differences",34,"content:python-how-to:34.calculate-date-differences.md","python-how-to/34.calculate-date-differences.md","python-how-to/34.calculate-date-differences",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":286,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python-how-to/parse-date-strings","Parse Date Strings","Convert text dates into Python datetime objects using strptime, handle multiple formats, and validate date input","parse-date-strings",35,"content:python-how-to:35.parse-date-strings.md","python-how-to/35.parse-date-strings.md","python-how-to/35.parse-date-strings",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":286,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python-how-to/handle-timezones","Handle Timezones","Master timezone handling with zoneinfo, UTC conversions, and timezone-aware datetime objects for global applications","handle-timezones",36,"content:python-how-to:36.handle-timezones.md","python-how-to/36.handle-timezones.md","python-how-to/36.handle-timezones",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":286,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python-how-to/work-with-timestamps","Work with Timestamps","Master Unix timestamps in Python - convert between datetime objects and timestamps for APIs, databases, and system integration","work-with-timestamps",37,"content:python-how-to:37.work-with-timestamps.md","python-how-to/37.work-with-timestamps.md","python-how-to/37.work-with-timestamps",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":290,"order":356,"isParent":13,"icon":357,"_type":15,"_id":358,"_source":17,"_file":359,"_stem":360,"_extension":20,"children":361},"/python-how-to/error-handling","Error Handling","Learn Python's error handling with try/except, custom exceptions, debugging, logging, and retry logic for robust applications","error-handling",38,"pi pi-exclamation-triangle","content:python-how-to:38.error-handling.md","python-how-to/38.error-handling.md","python-how-to/38.error-handling",[362,371,380,389,398],{"_path":363,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":364,"description":365,"slug":366,"parentId":352,"order":367,"_type":15,"_id":368,"_source":17,"_file":369,"_stem":370,"_extension":20},"/python-how-to/handle-exceptions","Handle Exceptions","Master try/except blocks, multiple exception handling, and finally clauses for robust error handling in Python","handle-exceptions",39,"content:python-how-to:39.handle-exceptions.md","python-how-to/39.handle-exceptions.md","python-how-to/39.handle-exceptions",{"_path":372,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":373,"description":374,"slug":375,"parentId":352,"order":376,"_type":15,"_id":377,"_source":17,"_file":378,"_stem":379,"_extension":20},"/python-how-to/create-custom-exceptions","Create Custom Exceptions","Learn to create custom exception classes in Python for specific error handling and better code organization","create-custom-exceptions",40,"content:python-how-to:40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions",{"_path":381,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":382,"description":383,"slug":384,"parentId":352,"order":385,"_type":15,"_id":386,"_source":17,"_file":387,"_stem":388,"_extension":20},"/python-how-to/debug-code","Debug Code","Learn Python debugging techniques using print statements, the debugger, and tools to find and fix code issues","debug-code",41,"content:python-how-to:41.debug-code.md","python-how-to/41.debug-code.md","python-how-to/41.debug-code",{"_path":390,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":391,"description":392,"slug":393,"parentId":352,"order":394,"_type":15,"_id":395,"_source":17,"_file":396,"_stem":397,"_extension":20},"/python-how-to/use-logging","Use Logging","Learn Python's logging module for tracking application behavior, errors, and debugging information","use-logging",42,"content:python-how-to:42.use-logging.md","python-how-to/42.use-logging.md","python-how-to/42.use-logging",{"_path":399,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":400,"description":401,"slug":402,"parentId":352,"order":403,"_type":15,"_id":404,"_source":17,"_file":405,"_stem":406,"_extension":20},"/python-how-to/implement-retry-logic","Implement Retry Logic","Learn to implement retry mechanisms in Python for handling temporary failures and building resilient applications","implement-retry-logic",43,"content:python-how-to:43.implement-retry-logic.md","python-how-to/43.implement-retry-logic.md","python-how-to/43.implement-retry-logic",{"_path":408,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":409,"description":410,"slug":411,"parentId":290,"order":412,"isParent":13,"icon":413,"_type":15,"_id":414,"_source":17,"_file":415,"_stem":416,"_extension":20,"children":417},"/python-how-to/functions-and-modules","Functions and Modules","Learn Python functions, modules, and code organization for building reusable, maintainable applications","functions-and-modules",44,"pi pi-box","content:python-how-to:44.functions-and-modules.md","python-how-to/44.functions-and-modules.md","python-how-to/44.functions-and-modules",[418,427,436,445,454,463],{"_path":419,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":420,"description":421,"slug":422,"parentId":408,"order":423,"_type":15,"_id":424,"_source":17,"_file":425,"_stem":426,"_extension":20},"/python-how-to/write-functions","Write Functions","Learn to create Python functions with parameters, return values, and documentation for reusable code","write-functions",45,"content:python-how-to:45.write-functions.md","python-how-to/45.write-functions.md","python-how-to/45.write-functions",{"_path":428,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":429,"description":430,"slug":431,"parentId":408,"order":432,"_type":15,"_id":433,"_source":17,"_file":434,"_stem":435,"_extension":20},"/python-how-to/use-args-kwargs","Use *args and **kwargs","Learn to use *args and **kwargs for flexible function arguments in Python","use-args-kwargs",46,"content:python-how-to:46.use-args-kwargs.md","python-how-to/46.use-args-kwargs.md","python-how-to/46.use-args-kwargs",{"_path":437,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":438,"description":439,"slug":440,"parentId":408,"order":441,"_type":15,"_id":442,"_source":17,"_file":443,"_stem":444,"_extension":20},"/python-how-to/create-decorators","Create Decorators","Learn to create and use Python decorators to enhance function behavior and add functionality","create-decorators",47,"content:python-how-to:47.create-decorators.md","python-how-to/47.create-decorators.md","python-how-to/47.create-decorators",{"_path":446,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":447,"description":448,"slug":449,"parentId":408,"order":450,"_type":15,"_id":451,"_source":17,"_file":452,"_stem":453,"_extension":20},"/python-how-to/use-generators","Use Generators","Learn to create memory-efficient generators with yield for processing large datasets and sequences","use-generators",48,"content:python-how-to:48.use-generators.md","python-how-to/48.use-generators.md","python-how-to/48.use-generators",{"_path":455,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":456,"description":457,"slug":458,"parentId":408,"order":459,"_type":15,"_id":460,"_source":17,"_file":461,"_stem":462,"_extension":20},"/python-how-to/work-modules-packages","Work with Modules and Packages","Learn to organize Python code with modules and packages, and use imports effectively","work-modules-packages",49,"content:python-how-to:49.work-modules-packages.md","python-how-to/49.work-modules-packages.md","python-how-to/49.work-modules-packages",{"_path":464,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":465,"description":466,"slug":467,"parentId":408,"order":468,"_type":15,"_id":469,"_source":17,"_file":470,"_stem":471,"_extension":20},"/python-how-to/create-virtual-environments","Create Virtual Environments","Learn to create and manage Python virtual environments for project dependency isolation","create-virtual-environments",50,"content:python-how-to:50.create-virtual-environments.md","python-how-to/50.create-virtual-environments.md","python-how-to/50.create-virtual-environments",{"_path":473,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":474,"description":475,"slug":476,"parentId":290,"order":477,"isParent":13,"icon":478,"_type":15,"_id":479,"_source":17,"_file":480,"_stem":481,"_extension":20,"children":482},"/python-how-to/data-processing","Data Processing","Learn Python data processing techniques including regex, APIs, databases, and large file handling","data-processing",51,"pi pi-database","content:python-how-to:51.data-processing.md","python-how-to/51.data-processing.md","python-how-to/51.data-processing",[483,492,501,510,519],{"_path":484,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":485,"description":486,"slug":487,"parentId":473,"order":488,"_type":15,"_id":489,"_source":17,"_file":490,"_stem":491,"_extension":20},"/python-how-to/work-regular-expressions","Work with Regular Expressions","Learn to use Python's re module for pattern matching, text extraction, and data validation","work-regular-expressions",52,"content:python-how-to:52.work-regular-expressions.md","python-how-to/52.work-regular-expressions.md","python-how-to/52.work-regular-expressions",{"_path":493,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":494,"description":495,"slug":496,"parentId":473,"order":497,"_type":15,"_id":498,"_source":17,"_file":499,"_stem":500,"_extension":20},"/python-how-to/parse-xml-html","Parse XML and HTML","Learn to extract data from XML and HTML documents using Python's built-in parsing tools","parse-xml-html",53,"content:python-how-to:53.parse-xml-html.md","python-how-to/53.parse-xml-html.md","python-how-to/53.parse-xml-html",{"_path":502,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":503,"description":504,"slug":505,"parentId":473,"order":506,"_type":15,"_id":507,"_source":17,"_file":508,"_stem":509,"_extension":20},"/python-how-to/handle-api-requests","Handle API Requests","Learn to fetch and process data from web APIs using Python's urllib and external requests library","handle-api-requests",54,"content:python-how-to:54.handle-api-requests.md","python-how-to/54.handle-api-requests.md","python-how-to/54.handle-api-requests",{"_path":511,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":512,"description":513,"slug":514,"parentId":473,"order":515,"_type":15,"_id":516,"_source":17,"_file":517,"_stem":518,"_extension":20},"/python-how-to/work-databases","Work with Databases","Learn to connect to and query SQL databases using Python's sqlite3 and database techniques","work-databases",55,"content:python-how-to:55.work-databases.md","python-how-to/55.work-databases.md","python-how-to/55.work-databases",{"_path":520,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":521,"description":522,"slug":523,"parentId":473,"order":524,"_type":15,"_id":525,"_source":17,"_file":526,"_stem":527,"_extension":20},"/python-how-to/process-large-files","Process Large Files","Learn memory-efficient techniques for handling large files and datasets in Python","process-large-files",56,"content:python-how-to:56.process-large-files.md","python-how-to/56.process-large-files.md","python-how-to/56.process-large-files",{"_path":529,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":530,"description":531,"slug":532,"parentId":290,"order":533,"isParent":13,"icon":534,"_type":15,"_id":535,"_source":17,"_file":536,"_stem":537,"_extension":20,"children":538},"/python-how-to/best-practices","Best Practices","Learn Python best practices for writing clean, maintainable, and efficient code","best-practices",57,"pi pi-star","content:python-how-to:57.best-practices.md","python-how-to/57.best-practices.md","python-how-to/57.best-practices",[539,548,557,566,575,584],{"_path":540,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":541,"description":542,"slug":543,"parentId":529,"order":544,"_type":15,"_id":545,"_source":17,"_file":546,"_stem":547,"_extension":20},"/python-how-to/structure-code","Structure Your Code","Learn to organize Python code with proper module structure, functions, and classes","structure-code",58,"content:python-how-to:58.structure-code.md","python-how-to/58.structure-code.md","python-how-to/58.structure-code",{"_path":549,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":550,"description":551,"slug":552,"parentId":529,"order":553,"_type":15,"_id":554,"_source":17,"_file":555,"_stem":556,"_extension":20},"/python-how-to/write-clean-code","Write Clean Code","Learn to write readable, maintainable Python code with proper naming, comments, and clear logic","write-clean-code",59,"content:python-how-to:59.write-clean-code.md","python-how-to/59.write-clean-code.md","python-how-to/59.write-clean-code",{"_path":558,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":559,"description":560,"slug":561,"parentId":529,"order":562,"_type":15,"_id":563,"_source":17,"_file":564,"_stem":565,"_extension":20},"/python-how-to/optimize-performance","Optimize Performance","Learn to identify and fix performance bottlenecks in Python code for faster execution","optimize-performance",60,"content:python-how-to:60.optimize-performance.md","python-how-to/60.optimize-performance.md","python-how-to/60.optimize-performance",{"_path":567,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":568,"description":569,"slug":570,"parentId":529,"order":571,"_type":15,"_id":572,"_source":17,"_file":573,"_stem":574,"_extension":20},"/python-how-to/write-unit-tests","Write Unit Tests","Learn to create reliable unit tests to verify your Python code works correctly and catch bugs early","write-unit-tests",61,"content:python-how-to:61.write-unit-tests.md","python-how-to/61.write-unit-tests.md","python-how-to/61.write-unit-tests",{"_path":576,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":577,"description":578,"slug":579,"parentId":529,"order":580,"_type":15,"_id":581,"_source":17,"_file":582,"_stem":583,"_extension":20},"/python-how-to/document-code","Document Your Code","Learn to write clear documentation and helpful comments for your Python code","document-code",62,"content:python-how-to:62.document-code.md","python-how-to/62.document-code.md","python-how-to/62.document-code",{"_path":585,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":586,"description":587,"slug":588,"parentId":529,"order":589,"_type":15,"_id":590,"_source":17,"_file":591,"_stem":592,"_extension":20},"/python-how-to/use-type-hints","Use Type Hints","Learn to add type annotations to Python code for better clarity, tooling support, and error detection","use-type-hints",63,"content:python-how-to:63.use-type-hints.md","python-how-to/63.use-type-hints.md","python-how-to/63.use-type-hints",{"_path":290,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":594,"description":595,"slug":6,"order":596,"icon":14,"_type":15,"_id":597,"_source":17,"_file":598,"_stem":599,"_extension":20,"expanded":13},"Python How-To Guide","Practical Python tutorials for common programming tasks. Learn step-by-step solutions for string manipulation, file operations, data processing, and more with real-world examples.",0,"content:python-how-to:index.md","python-how-to/index.md","python-how-to/index",[297],{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":286,"order":302,"body":602,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},{"type":603,"children":604,"toc":4195},"root",[605,614,629,862,869,874,990,997,1358,1364,1706,1712,1996,2002,2007,2083,2089,2338,2344,2604,2610,2615,2621,2859,2865,3291,3297,3791,3797,3988,3994,4163,4169,4174,4189],{"type":606,"tag":607,"props":608,"children":610},"element","h1",{"id":609},"getting-current-date-and-time",[611],{"type":612,"value":613},"text","🕐 Getting Current Date and Time",{"type":606,"tag":615,"props":616,"children":617},"p",{},[618,620,627],{"type":612,"value":619},"Getting the current date and time is one of the most common operations in programming. Python's ",{"type":606,"tag":621,"props":622,"children":624},"code",{"className":623},[],[625],{"type":612,"value":626},"datetime",{"type":612,"value":628}," module provides several ways to retrieve current temporal information, whether you need just the date, just the time, or both together.",{"type":606,"tag":630,"props":631,"children":632},"code-try",{},[633],{"type":606,"tag":634,"props":635,"children":639},"pre",{"className":636,"code":637,"language":638,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","from datetime import datetime, date, time\n\n# Get current date and time\nnow = datetime.now()\ntoday = date.today()\n\nprint(f\"Current datetime: {now}\")\nprint(f\"Today's date: {today}\")\nprint(f\"Current time: {now.time()}\")\n","python",[640],{"type":606,"tag":621,"props":641,"children":642},{"__ignoreMap":8},[643,670,678,687,705,722,729,779,820],{"type":606,"tag":644,"props":645,"children":647},"span",{"class":646,"line":12},"line",[648,654,660,665],{"type":606,"tag":644,"props":649,"children":651},{"style":650},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[652],{"type":612,"value":653},"from",{"type":606,"tag":644,"props":655,"children":657},{"style":656},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[658],{"type":612,"value":659}," datetime ",{"type":606,"tag":644,"props":661,"children":662},{"style":650},[663],{"type":612,"value":664},"import",{"type":606,"tag":644,"props":666,"children":667},{"style":656},[668],{"type":612,"value":669}," datetime, date, time\n",{"type":606,"tag":644,"props":671,"children":672},{"class":646,"line":27},[673],{"type":606,"tag":644,"props":674,"children":675},{"emptyLinePlaceholder":13},[676],{"type":612,"value":677},"\n",{"type":606,"tag":644,"props":679,"children":680},{"class":646,"line":36},[681],{"type":606,"tag":644,"props":682,"children":684},{"style":683},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[685],{"type":612,"value":686},"# Get current date and time\n",{"type":606,"tag":644,"props":688,"children":689},{"class":646,"line":45},[690,695,700],{"type":606,"tag":644,"props":691,"children":692},{"style":656},[693],{"type":612,"value":694},"now ",{"type":606,"tag":644,"props":696,"children":697},{"style":650},[698],{"type":612,"value":699},"=",{"type":606,"tag":644,"props":701,"children":702},{"style":656},[703],{"type":612,"value":704}," datetime.now()\n",{"type":606,"tag":644,"props":706,"children":707},{"class":646,"line":54},[708,713,717],{"type":606,"tag":644,"props":709,"children":710},{"style":656},[711],{"type":612,"value":712},"today ",{"type":606,"tag":644,"props":714,"children":715},{"style":650},[716],{"type":612,"value":699},{"type":606,"tag":644,"props":718,"children":719},{"style":656},[720],{"type":612,"value":721}," date.today()\n",{"type":606,"tag":644,"props":723,"children":724},{"class":646,"line":63},[725],{"type":606,"tag":644,"props":726,"children":727},{"emptyLinePlaceholder":13},[728],{"type":612,"value":677},{"type":606,"tag":644,"props":730,"children":731},{"class":646,"line":72},[732,738,743,748,754,759,764,769,774],{"type":606,"tag":644,"props":733,"children":735},{"style":734},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[736],{"type":612,"value":737},"print",{"type":606,"tag":644,"props":739,"children":740},{"style":656},[741],{"type":612,"value":742},"(",{"type":606,"tag":644,"props":744,"children":745},{"style":650},[746],{"type":612,"value":747},"f",{"type":606,"tag":644,"props":749,"children":751},{"style":750},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[752],{"type":612,"value":753},"\"Current datetime: ",{"type":606,"tag":644,"props":755,"children":756},{"style":734},[757],{"type":612,"value":758},"{",{"type":606,"tag":644,"props":760,"children":761},{"style":656},[762],{"type":612,"value":763},"now",{"type":606,"tag":644,"props":765,"children":766},{"style":734},[767],{"type":612,"value":768},"}",{"type":606,"tag":644,"props":770,"children":771},{"style":750},[772],{"type":612,"value":773},"\"",{"type":606,"tag":644,"props":775,"children":776},{"style":656},[777],{"type":612,"value":778},")\n",{"type":606,"tag":644,"props":780,"children":781},{"class":646,"line":81},[782,786,790,794,799,803,808,812,816],{"type":606,"tag":644,"props":783,"children":784},{"style":734},[785],{"type":612,"value":737},{"type":606,"tag":644,"props":787,"children":788},{"style":656},[789],{"type":612,"value":742},{"type":606,"tag":644,"props":791,"children":792},{"style":650},[793],{"type":612,"value":747},{"type":606,"tag":644,"props":795,"children":796},{"style":750},[797],{"type":612,"value":798},"\"Today's date: ",{"type":606,"tag":644,"props":800,"children":801},{"style":734},[802],{"type":612,"value":758},{"type":606,"tag":644,"props":804,"children":805},{"style":656},[806],{"type":612,"value":807},"today",{"type":606,"tag":644,"props":809,"children":810},{"style":734},[811],{"type":612,"value":768},{"type":606,"tag":644,"props":813,"children":814},{"style":750},[815],{"type":612,"value":773},{"type":606,"tag":644,"props":817,"children":818},{"style":656},[819],{"type":612,"value":778},{"type":606,"tag":644,"props":821,"children":823},{"class":646,"line":822},9,[824,828,832,836,841,845,850,854,858],{"type":606,"tag":644,"props":825,"children":826},{"style":734},[827],{"type":612,"value":737},{"type":606,"tag":644,"props":829,"children":830},{"style":656},[831],{"type":612,"value":742},{"type":606,"tag":644,"props":833,"children":834},{"style":650},[835],{"type":612,"value":747},{"type":606,"tag":644,"props":837,"children":838},{"style":750},[839],{"type":612,"value":840},"\"Current time: ",{"type":606,"tag":644,"props":842,"children":843},{"style":734},[844],{"type":612,"value":758},{"type":606,"tag":644,"props":846,"children":847},{"style":656},[848],{"type":612,"value":849},"now.time()",{"type":606,"tag":644,"props":851,"children":852},{"style":734},[853],{"type":612,"value":768},{"type":606,"tag":644,"props":855,"children":856},{"style":750},[857],{"type":612,"value":773},{"type":606,"tag":644,"props":859,"children":860},{"style":656},[861],{"type":612,"value":778},{"type":606,"tag":863,"props":864,"children":866},"h2",{"id":865},"different-ways-to-get-current-time",[867],{"type":612,"value":868},"🎯 Different Ways to Get Current Time",{"type":606,"tag":615,"props":870,"children":871},{},[872],{"type":612,"value":873},"Python offers multiple methods to get current temporal information depending on your needs.",{"type":606,"tag":875,"props":876,"children":880},"info-box",{"emoji":877,"title":878,"type":879},"⏰","Current Time Methods","info",[881,890,939,947],{"type":606,"tag":615,"props":882,"children":883},{},[884],{"type":606,"tag":885,"props":886,"children":887},"strong",{},[888],{"type":612,"value":889},"Main Methods:",{"type":606,"tag":891,"props":892,"children":893},"ul",{},[894,906,917,928],{"type":606,"tag":895,"props":896,"children":897},"li",{},[898,904],{"type":606,"tag":621,"props":899,"children":901},{"className":900},[],[902],{"type":612,"value":903},"datetime.now()",{"type":612,"value":905},": Current date and time",{"type":606,"tag":895,"props":907,"children":908},{},[909,915],{"type":606,"tag":621,"props":910,"children":912},{"className":911},[],[913],{"type":612,"value":914},"date.today()",{"type":612,"value":916},": Current date only",{"type":606,"tag":895,"props":918,"children":919},{},[920,926],{"type":606,"tag":621,"props":921,"children":923},{"className":922},[],[924],{"type":612,"value":925},"datetime.utcnow()",{"type":612,"value":927},": UTC date and time",{"type":606,"tag":895,"props":929,"children":930},{},[931,937],{"type":606,"tag":621,"props":932,"children":934},{"className":933},[],[935],{"type":612,"value":936},"time.time()",{"type":612,"value":938},": Unix timestamp",{"type":606,"tag":615,"props":940,"children":941},{},[942],{"type":606,"tag":885,"props":943,"children":944},{},[945],{"type":612,"value":946},"Use Cases:",{"type":606,"tag":891,"props":948,"children":949},{},[950,960,970,980],{"type":606,"tag":895,"props":951,"children":952},{},[953,955],{"type":612,"value":954},"Logging events: ",{"type":606,"tag":621,"props":956,"children":958},{"className":957},[],[959],{"type":612,"value":903},{"type":606,"tag":895,"props":961,"children":962},{},[963,965],{"type":612,"value":964},"Daily reports: ",{"type":606,"tag":621,"props":966,"children":968},{"className":967},[],[969],{"type":612,"value":914},{"type":606,"tag":895,"props":971,"children":972},{},[973,975],{"type":612,"value":974},"International apps: ",{"type":606,"tag":621,"props":976,"children":978},{"className":977},[],[979],{"type":612,"value":925},{"type":606,"tag":895,"props":981,"children":982},{},[983,985],{"type":612,"value":984},"Performance timing: ",{"type":606,"tag":621,"props":986,"children":988},{"className":987},[],[989],{"type":612,"value":936},{"type":606,"tag":991,"props":992,"children":994},"h3",{"id":993},"current-date-and-time",[995],{"type":612,"value":996},"Current Date and Time",{"type":606,"tag":630,"props":998,"children":999},{},[1000],{"type":606,"tag":634,"props":1001,"children":1003},{"className":636,"code":1002,"language":638,"meta":8,"style":8},"from datetime import datetime\n\n# Get current local date and time\nnow = datetime.now()\nprint(f\"Now: {now}\")\n\n# Get specific components\nprint(f\"Year: {now.year}\")\nprint(f\"Month: {now.month}\")\nprint(f\"Day: {now.day}\")\nprint(f\"Hour: {now.hour}\")\nprint(f\"Minute: {now.minute}\")\nprint(f\"Second: {now.second}\")\n",[1004],{"type":606,"tag":621,"props":1005,"children":1006},{"__ignoreMap":8},[1007,1027,1034,1042,1057,1097,1104,1112,1153,1194,1235,1276,1317],{"type":606,"tag":644,"props":1008,"children":1009},{"class":646,"line":12},[1010,1014,1018,1022],{"type":606,"tag":644,"props":1011,"children":1012},{"style":650},[1013],{"type":612,"value":653},{"type":606,"tag":644,"props":1015,"children":1016},{"style":656},[1017],{"type":612,"value":659},{"type":606,"tag":644,"props":1019,"children":1020},{"style":650},[1021],{"type":612,"value":664},{"type":606,"tag":644,"props":1023,"children":1024},{"style":656},[1025],{"type":612,"value":1026}," datetime\n",{"type":606,"tag":644,"props":1028,"children":1029},{"class":646,"line":27},[1030],{"type":606,"tag":644,"props":1031,"children":1032},{"emptyLinePlaceholder":13},[1033],{"type":612,"value":677},{"type":606,"tag":644,"props":1035,"children":1036},{"class":646,"line":36},[1037],{"type":606,"tag":644,"props":1038,"children":1039},{"style":683},[1040],{"type":612,"value":1041},"# Get current local date and time\n",{"type":606,"tag":644,"props":1043,"children":1044},{"class":646,"line":45},[1045,1049,1053],{"type":606,"tag":644,"props":1046,"children":1047},{"style":656},[1048],{"type":612,"value":694},{"type":606,"tag":644,"props":1050,"children":1051},{"style":650},[1052],{"type":612,"value":699},{"type":606,"tag":644,"props":1054,"children":1055},{"style":656},[1056],{"type":612,"value":704},{"type":606,"tag":644,"props":1058,"children":1059},{"class":646,"line":54},[1060,1064,1068,1072,1077,1081,1085,1089,1093],{"type":606,"tag":644,"props":1061,"children":1062},{"style":734},[1063],{"type":612,"value":737},{"type":606,"tag":644,"props":1065,"children":1066},{"style":656},[1067],{"type":612,"value":742},{"type":606,"tag":644,"props":1069,"children":1070},{"style":650},[1071],{"type":612,"value":747},{"type":606,"tag":644,"props":1073,"children":1074},{"style":750},[1075],{"type":612,"value":1076},"\"Now: ",{"type":606,"tag":644,"props":1078,"children":1079},{"style":734},[1080],{"type":612,"value":758},{"type":606,"tag":644,"props":1082,"children":1083},{"style":656},[1084],{"type":612,"value":763},{"type":606,"tag":644,"props":1086,"children":1087},{"style":734},[1088],{"type":612,"value":768},{"type":606,"tag":644,"props":1090,"children":1091},{"style":750},[1092],{"type":612,"value":773},{"type":606,"tag":644,"props":1094,"children":1095},{"style":656},[1096],{"type":612,"value":778},{"type":606,"tag":644,"props":1098,"children":1099},{"class":646,"line":63},[1100],{"type":606,"tag":644,"props":1101,"children":1102},{"emptyLinePlaceholder":13},[1103],{"type":612,"value":677},{"type":606,"tag":644,"props":1105,"children":1106},{"class":646,"line":72},[1107],{"type":606,"tag":644,"props":1108,"children":1109},{"style":683},[1110],{"type":612,"value":1111},"# Get specific components\n",{"type":606,"tag":644,"props":1113,"children":1114},{"class":646,"line":81},[1115,1119,1123,1127,1132,1136,1141,1145,1149],{"type":606,"tag":644,"props":1116,"children":1117},{"style":734},[1118],{"type":612,"value":737},{"type":606,"tag":644,"props":1120,"children":1121},{"style":656},[1122],{"type":612,"value":742},{"type":606,"tag":644,"props":1124,"children":1125},{"style":650},[1126],{"type":612,"value":747},{"type":606,"tag":644,"props":1128,"children":1129},{"style":750},[1130],{"type":612,"value":1131},"\"Year: ",{"type":606,"tag":644,"props":1133,"children":1134},{"style":734},[1135],{"type":612,"value":758},{"type":606,"tag":644,"props":1137,"children":1138},{"style":656},[1139],{"type":612,"value":1140},"now.year",{"type":606,"tag":644,"props":1142,"children":1143},{"style":734},[1144],{"type":612,"value":768},{"type":606,"tag":644,"props":1146,"children":1147},{"style":750},[1148],{"type":612,"value":773},{"type":606,"tag":644,"props":1150,"children":1151},{"style":656},[1152],{"type":612,"value":778},{"type":606,"tag":644,"props":1154,"children":1155},{"class":646,"line":822},[1156,1160,1164,1168,1173,1177,1182,1186,1190],{"type":606,"tag":644,"props":1157,"children":1158},{"style":734},[1159],{"type":612,"value":737},{"type":606,"tag":644,"props":1161,"children":1162},{"style":656},[1163],{"type":612,"value":742},{"type":606,"tag":644,"props":1165,"children":1166},{"style":650},[1167],{"type":612,"value":747},{"type":606,"tag":644,"props":1169,"children":1170},{"style":750},[1171],{"type":612,"value":1172},"\"Month: ",{"type":606,"tag":644,"props":1174,"children":1175},{"style":734},[1176],{"type":612,"value":758},{"type":606,"tag":644,"props":1178,"children":1179},{"style":656},[1180],{"type":612,"value":1181},"now.month",{"type":606,"tag":644,"props":1183,"children":1184},{"style":734},[1185],{"type":612,"value":768},{"type":606,"tag":644,"props":1187,"children":1188},{"style":750},[1189],{"type":612,"value":773},{"type":606,"tag":644,"props":1191,"children":1192},{"style":656},[1193],{"type":612,"value":778},{"type":606,"tag":644,"props":1195,"children":1196},{"class":646,"line":99},[1197,1201,1205,1209,1214,1218,1223,1227,1231],{"type":606,"tag":644,"props":1198,"children":1199},{"style":734},[1200],{"type":612,"value":737},{"type":606,"tag":644,"props":1202,"children":1203},{"style":656},[1204],{"type":612,"value":742},{"type":606,"tag":644,"props":1206,"children":1207},{"style":650},[1208],{"type":612,"value":747},{"type":606,"tag":644,"props":1210,"children":1211},{"style":750},[1212],{"type":612,"value":1213},"\"Day: ",{"type":606,"tag":644,"props":1215,"children":1216},{"style":734},[1217],{"type":612,"value":758},{"type":606,"tag":644,"props":1219,"children":1220},{"style":656},[1221],{"type":612,"value":1222},"now.day",{"type":606,"tag":644,"props":1224,"children":1225},{"style":734},[1226],{"type":612,"value":768},{"type":606,"tag":644,"props":1228,"children":1229},{"style":750},[1230],{"type":612,"value":773},{"type":606,"tag":644,"props":1232,"children":1233},{"style":656},[1234],{"type":612,"value":778},{"type":606,"tag":644,"props":1236,"children":1237},{"class":646,"line":108},[1238,1242,1246,1250,1255,1259,1264,1268,1272],{"type":606,"tag":644,"props":1239,"children":1240},{"style":734},[1241],{"type":612,"value":737},{"type":606,"tag":644,"props":1243,"children":1244},{"style":656},[1245],{"type":612,"value":742},{"type":606,"tag":644,"props":1247,"children":1248},{"style":650},[1249],{"type":612,"value":747},{"type":606,"tag":644,"props":1251,"children":1252},{"style":750},[1253],{"type":612,"value":1254},"\"Hour: ",{"type":606,"tag":644,"props":1256,"children":1257},{"style":734},[1258],{"type":612,"value":758},{"type":606,"tag":644,"props":1260,"children":1261},{"style":656},[1262],{"type":612,"value":1263},"now.hour",{"type":606,"tag":644,"props":1265,"children":1266},{"style":734},[1267],{"type":612,"value":768},{"type":606,"tag":644,"props":1269,"children":1270},{"style":750},[1271],{"type":612,"value":773},{"type":606,"tag":644,"props":1273,"children":1274},{"style":656},[1275],{"type":612,"value":778},{"type":606,"tag":644,"props":1277,"children":1278},{"class":646,"line":117},[1279,1283,1287,1291,1296,1300,1305,1309,1313],{"type":606,"tag":644,"props":1280,"children":1281},{"style":734},[1282],{"type":612,"value":737},{"type":606,"tag":644,"props":1284,"children":1285},{"style":656},[1286],{"type":612,"value":742},{"type":606,"tag":644,"props":1288,"children":1289},{"style":650},[1290],{"type":612,"value":747},{"type":606,"tag":644,"props":1292,"children":1293},{"style":750},[1294],{"type":612,"value":1295},"\"Minute: ",{"type":606,"tag":644,"props":1297,"children":1298},{"style":734},[1299],{"type":612,"value":758},{"type":606,"tag":644,"props":1301,"children":1302},{"style":656},[1303],{"type":612,"value":1304},"now.minute",{"type":606,"tag":644,"props":1306,"children":1307},{"style":734},[1308],{"type":612,"value":768},{"type":606,"tag":644,"props":1310,"children":1311},{"style":750},[1312],{"type":612,"value":773},{"type":606,"tag":644,"props":1314,"children":1315},{"style":656},[1316],{"type":612,"value":778},{"type":606,"tag":644,"props":1318,"children":1319},{"class":646,"line":126},[1320,1324,1328,1332,1337,1341,1346,1350,1354],{"type":606,"tag":644,"props":1321,"children":1322},{"style":734},[1323],{"type":612,"value":737},{"type":606,"tag":644,"props":1325,"children":1326},{"style":656},[1327],{"type":612,"value":742},{"type":606,"tag":644,"props":1329,"children":1330},{"style":650},[1331],{"type":612,"value":747},{"type":606,"tag":644,"props":1333,"children":1334},{"style":750},[1335],{"type":612,"value":1336},"\"Second: ",{"type":606,"tag":644,"props":1338,"children":1339},{"style":734},[1340],{"type":612,"value":758},{"type":606,"tag":644,"props":1342,"children":1343},{"style":656},[1344],{"type":612,"value":1345},"now.second",{"type":606,"tag":644,"props":1347,"children":1348},{"style":734},[1349],{"type":612,"value":768},{"type":606,"tag":644,"props":1351,"children":1352},{"style":750},[1353],{"type":612,"value":773},{"type":606,"tag":644,"props":1355,"children":1356},{"style":656},[1357],{"type":612,"value":778},{"type":606,"tag":991,"props":1359,"children":1361},{"id":1360},"current-date-only",[1362],{"type":612,"value":1363},"Current Date Only",{"type":606,"tag":630,"props":1365,"children":1366},{},[1367],{"type":606,"tag":634,"props":1368,"children":1370},{"className":636,"code":1369,"language":638,"meta":8,"style":8},"from datetime import date\n\n# Get current date\ntoday = date.today()\nprint(f\"Today: {today}\")\n\n# Get date components\nprint(f\"Year: {today.year}\")\nprint(f\"Month: {today.month}\")\nprint(f\"Day: {today.day}\")\n\n# Get weekday (0=Monday, 6=Sunday)\nprint(f\"Weekday: {today.weekday()}\")\nprint(f\"Day name: {today.strftime('%A')}\")\n",[1371],{"type":606,"tag":621,"props":1372,"children":1373},{"__ignoreMap":8},[1374,1394,1401,1409,1424,1464,1471,1479,1519,1559,1599,1606,1614,1655],{"type":606,"tag":644,"props":1375,"children":1376},{"class":646,"line":12},[1377,1381,1385,1389],{"type":606,"tag":644,"props":1378,"children":1379},{"style":650},[1380],{"type":612,"value":653},{"type":606,"tag":644,"props":1382,"children":1383},{"style":656},[1384],{"type":612,"value":659},{"type":606,"tag":644,"props":1386,"children":1387},{"style":650},[1388],{"type":612,"value":664},{"type":606,"tag":644,"props":1390,"children":1391},{"style":656},[1392],{"type":612,"value":1393}," date\n",{"type":606,"tag":644,"props":1395,"children":1396},{"class":646,"line":27},[1397],{"type":606,"tag":644,"props":1398,"children":1399},{"emptyLinePlaceholder":13},[1400],{"type":612,"value":677},{"type":606,"tag":644,"props":1402,"children":1403},{"class":646,"line":36},[1404],{"type":606,"tag":644,"props":1405,"children":1406},{"style":683},[1407],{"type":612,"value":1408},"# Get current date\n",{"type":606,"tag":644,"props":1410,"children":1411},{"class":646,"line":45},[1412,1416,1420],{"type":606,"tag":644,"props":1413,"children":1414},{"style":656},[1415],{"type":612,"value":712},{"type":606,"tag":644,"props":1417,"children":1418},{"style":650},[1419],{"type":612,"value":699},{"type":606,"tag":644,"props":1421,"children":1422},{"style":656},[1423],{"type":612,"value":721},{"type":606,"tag":644,"props":1425,"children":1426},{"class":646,"line":54},[1427,1431,1435,1439,1444,1448,1452,1456,1460],{"type":606,"tag":644,"props":1428,"children":1429},{"style":734},[1430],{"type":612,"value":737},{"type":606,"tag":644,"props":1432,"children":1433},{"style":656},[1434],{"type":612,"value":742},{"type":606,"tag":644,"props":1436,"children":1437},{"style":650},[1438],{"type":612,"value":747},{"type":606,"tag":644,"props":1440,"children":1441},{"style":750},[1442],{"type":612,"value":1443},"\"Today: ",{"type":606,"tag":644,"props":1445,"children":1446},{"style":734},[1447],{"type":612,"value":758},{"type":606,"tag":644,"props":1449,"children":1450},{"style":656},[1451],{"type":612,"value":807},{"type":606,"tag":644,"props":1453,"children":1454},{"style":734},[1455],{"type":612,"value":768},{"type":606,"tag":644,"props":1457,"children":1458},{"style":750},[1459],{"type":612,"value":773},{"type":606,"tag":644,"props":1461,"children":1462},{"style":656},[1463],{"type":612,"value":778},{"type":606,"tag":644,"props":1465,"children":1466},{"class":646,"line":63},[1467],{"type":606,"tag":644,"props":1468,"children":1469},{"emptyLinePlaceholder":13},[1470],{"type":612,"value":677},{"type":606,"tag":644,"props":1472,"children":1473},{"class":646,"line":72},[1474],{"type":606,"tag":644,"props":1475,"children":1476},{"style":683},[1477],{"type":612,"value":1478},"# Get date components\n",{"type":606,"tag":644,"props":1480,"children":1481},{"class":646,"line":81},[1482,1486,1490,1494,1498,1502,1507,1511,1515],{"type":606,"tag":644,"props":1483,"children":1484},{"style":734},[1485],{"type":612,"value":737},{"type":606,"tag":644,"props":1487,"children":1488},{"style":656},[1489],{"type":612,"value":742},{"type":606,"tag":644,"props":1491,"children":1492},{"style":650},[1493],{"type":612,"value":747},{"type":606,"tag":644,"props":1495,"children":1496},{"style":750},[1497],{"type":612,"value":1131},{"type":606,"tag":644,"props":1499,"children":1500},{"style":734},[1501],{"type":612,"value":758},{"type":606,"tag":644,"props":1503,"children":1504},{"style":656},[1505],{"type":612,"value":1506},"today.year",{"type":606,"tag":644,"props":1508,"children":1509},{"style":734},[1510],{"type":612,"value":768},{"type":606,"tag":644,"props":1512,"children":1513},{"style":750},[1514],{"type":612,"value":773},{"type":606,"tag":644,"props":1516,"children":1517},{"style":656},[1518],{"type":612,"value":778},{"type":606,"tag":644,"props":1520,"children":1521},{"class":646,"line":822},[1522,1526,1530,1534,1538,1542,1547,1551,1555],{"type":606,"tag":644,"props":1523,"children":1524},{"style":734},[1525],{"type":612,"value":737},{"type":606,"tag":644,"props":1527,"children":1528},{"style":656},[1529],{"type":612,"value":742},{"type":606,"tag":644,"props":1531,"children":1532},{"style":650},[1533],{"type":612,"value":747},{"type":606,"tag":644,"props":1535,"children":1536},{"style":750},[1537],{"type":612,"value":1172},{"type":606,"tag":644,"props":1539,"children":1540},{"style":734},[1541],{"type":612,"value":758},{"type":606,"tag":644,"props":1543,"children":1544},{"style":656},[1545],{"type":612,"value":1546},"today.month",{"type":606,"tag":644,"props":1548,"children":1549},{"style":734},[1550],{"type":612,"value":768},{"type":606,"tag":644,"props":1552,"children":1553},{"style":750},[1554],{"type":612,"value":773},{"type":606,"tag":644,"props":1556,"children":1557},{"style":656},[1558],{"type":612,"value":778},{"type":606,"tag":644,"props":1560,"children":1561},{"class":646,"line":99},[1562,1566,1570,1574,1578,1582,1587,1591,1595],{"type":606,"tag":644,"props":1563,"children":1564},{"style":734},[1565],{"type":612,"value":737},{"type":606,"tag":644,"props":1567,"children":1568},{"style":656},[1569],{"type":612,"value":742},{"type":606,"tag":644,"props":1571,"children":1572},{"style":650},[1573],{"type":612,"value":747},{"type":606,"tag":644,"props":1575,"children":1576},{"style":750},[1577],{"type":612,"value":1213},{"type":606,"tag":644,"props":1579,"children":1580},{"style":734},[1581],{"type":612,"value":758},{"type":606,"tag":644,"props":1583,"children":1584},{"style":656},[1585],{"type":612,"value":1586},"today.day",{"type":606,"tag":644,"props":1588,"children":1589},{"style":734},[1590],{"type":612,"value":768},{"type":606,"tag":644,"props":1592,"children":1593},{"style":750},[1594],{"type":612,"value":773},{"type":606,"tag":644,"props":1596,"children":1597},{"style":656},[1598],{"type":612,"value":778},{"type":606,"tag":644,"props":1600,"children":1601},{"class":646,"line":108},[1602],{"type":606,"tag":644,"props":1603,"children":1604},{"emptyLinePlaceholder":13},[1605],{"type":612,"value":677},{"type":606,"tag":644,"props":1607,"children":1608},{"class":646,"line":117},[1609],{"type":606,"tag":644,"props":1610,"children":1611},{"style":683},[1612],{"type":612,"value":1613},"# Get weekday (0=Monday, 6=Sunday)\n",{"type":606,"tag":644,"props":1615,"children":1616},{"class":646,"line":126},[1617,1621,1625,1629,1634,1638,1643,1647,1651],{"type":606,"tag":644,"props":1618,"children":1619},{"style":734},[1620],{"type":612,"value":737},{"type":606,"tag":644,"props":1622,"children":1623},{"style":656},[1624],{"type":612,"value":742},{"type":606,"tag":644,"props":1626,"children":1627},{"style":650},[1628],{"type":612,"value":747},{"type":606,"tag":644,"props":1630,"children":1631},{"style":750},[1632],{"type":612,"value":1633},"\"Weekday: ",{"type":606,"tag":644,"props":1635,"children":1636},{"style":734},[1637],{"type":612,"value":758},{"type":606,"tag":644,"props":1639,"children":1640},{"style":656},[1641],{"type":612,"value":1642},"today.weekday()",{"type":606,"tag":644,"props":1644,"children":1645},{"style":734},[1646],{"type":612,"value":768},{"type":606,"tag":644,"props":1648,"children":1649},{"style":750},[1650],{"type":612,"value":773},{"type":606,"tag":644,"props":1652,"children":1653},{"style":656},[1654],{"type":612,"value":778},{"type":606,"tag":644,"props":1656,"children":1657},{"class":646,"line":135},[1658,1662,1666,1670,1675,1679,1684,1689,1694,1698,1702],{"type":606,"tag":644,"props":1659,"children":1660},{"style":734},[1661],{"type":612,"value":737},{"type":606,"tag":644,"props":1663,"children":1664},{"style":656},[1665],{"type":612,"value":742},{"type":606,"tag":644,"props":1667,"children":1668},{"style":650},[1669],{"type":612,"value":747},{"type":606,"tag":644,"props":1671,"children":1672},{"style":750},[1673],{"type":612,"value":1674},"\"Day name: ",{"type":606,"tag":644,"props":1676,"children":1677},{"style":734},[1678],{"type":612,"value":758},{"type":606,"tag":644,"props":1680,"children":1681},{"style":656},[1682],{"type":612,"value":1683},"today.strftime(",{"type":606,"tag":644,"props":1685,"children":1686},{"style":750},[1687],{"type":612,"value":1688},"'%A'",{"type":606,"tag":644,"props":1690,"children":1691},{"style":656},[1692],{"type":612,"value":1693},")",{"type":606,"tag":644,"props":1695,"children":1696},{"style":734},[1697],{"type":612,"value":768},{"type":606,"tag":644,"props":1699,"children":1700},{"style":750},[1701],{"type":612,"value":773},{"type":606,"tag":644,"props":1703,"children":1704},{"style":656},[1705],{"type":612,"value":778},{"type":606,"tag":991,"props":1707,"children":1709},{"id":1708},"current-time-only",[1710],{"type":612,"value":1711},"Current Time Only",{"type":606,"tag":630,"props":1713,"children":1714},{},[1715],{"type":606,"tag":634,"props":1716,"children":1718},{"className":636,"code":1717,"language":638,"meta":8,"style":8},"from datetime import datetime\n\n# Get current time from datetime\nnow = datetime.now()\ncurrent_time = now.time()\n\nprint(f\"Current time: {current_time}\")\nprint(f\"Hour: {current_time.hour}\")\nprint(f\"Minute: {current_time.minute}\")\nprint(f\"Second: {current_time.second}\")\nprint(f\"Microsecond: {current_time.microsecond}\")\n",[1719],{"type":606,"tag":621,"props":1720,"children":1721},{"__ignoreMap":8},[1722,1741,1748,1756,1771,1788,1795,1835,1875,1915,1955],{"type":606,"tag":644,"props":1723,"children":1724},{"class":646,"line":12},[1725,1729,1733,1737],{"type":606,"tag":644,"props":1726,"children":1727},{"style":650},[1728],{"type":612,"value":653},{"type":606,"tag":644,"props":1730,"children":1731},{"style":656},[1732],{"type":612,"value":659},{"type":606,"tag":644,"props":1734,"children":1735},{"style":650},[1736],{"type":612,"value":664},{"type":606,"tag":644,"props":1738,"children":1739},{"style":656},[1740],{"type":612,"value":1026},{"type":606,"tag":644,"props":1742,"children":1743},{"class":646,"line":27},[1744],{"type":606,"tag":644,"props":1745,"children":1746},{"emptyLinePlaceholder":13},[1747],{"type":612,"value":677},{"type":606,"tag":644,"props":1749,"children":1750},{"class":646,"line":36},[1751],{"type":606,"tag":644,"props":1752,"children":1753},{"style":683},[1754],{"type":612,"value":1755},"# Get current time from datetime\n",{"type":606,"tag":644,"props":1757,"children":1758},{"class":646,"line":45},[1759,1763,1767],{"type":606,"tag":644,"props":1760,"children":1761},{"style":656},[1762],{"type":612,"value":694},{"type":606,"tag":644,"props":1764,"children":1765},{"style":650},[1766],{"type":612,"value":699},{"type":606,"tag":644,"props":1768,"children":1769},{"style":656},[1770],{"type":612,"value":704},{"type":606,"tag":644,"props":1772,"children":1773},{"class":646,"line":54},[1774,1779,1783],{"type":606,"tag":644,"props":1775,"children":1776},{"style":656},[1777],{"type":612,"value":1778},"current_time ",{"type":606,"tag":644,"props":1780,"children":1781},{"style":650},[1782],{"type":612,"value":699},{"type":606,"tag":644,"props":1784,"children":1785},{"style":656},[1786],{"type":612,"value":1787}," now.time()\n",{"type":606,"tag":644,"props":1789,"children":1790},{"class":646,"line":63},[1791],{"type":606,"tag":644,"props":1792,"children":1793},{"emptyLinePlaceholder":13},[1794],{"type":612,"value":677},{"type":606,"tag":644,"props":1796,"children":1797},{"class":646,"line":72},[1798,1802,1806,1810,1814,1818,1823,1827,1831],{"type":606,"tag":644,"props":1799,"children":1800},{"style":734},[1801],{"type":612,"value":737},{"type":606,"tag":644,"props":1803,"children":1804},{"style":656},[1805],{"type":612,"value":742},{"type":606,"tag":644,"props":1807,"children":1808},{"style":650},[1809],{"type":612,"value":747},{"type":606,"tag":644,"props":1811,"children":1812},{"style":750},[1813],{"type":612,"value":840},{"type":606,"tag":644,"props":1815,"children":1816},{"style":734},[1817],{"type":612,"value":758},{"type":606,"tag":644,"props":1819,"children":1820},{"style":656},[1821],{"type":612,"value":1822},"current_time",{"type":606,"tag":644,"props":1824,"children":1825},{"style":734},[1826],{"type":612,"value":768},{"type":606,"tag":644,"props":1828,"children":1829},{"style":750},[1830],{"type":612,"value":773},{"type":606,"tag":644,"props":1832,"children":1833},{"style":656},[1834],{"type":612,"value":778},{"type":606,"tag":644,"props":1836,"children":1837},{"class":646,"line":81},[1838,1842,1846,1850,1854,1858,1863,1867,1871],{"type":606,"tag":644,"props":1839,"children":1840},{"style":734},[1841],{"type":612,"value":737},{"type":606,"tag":644,"props":1843,"children":1844},{"style":656},[1845],{"type":612,"value":742},{"type":606,"tag":644,"props":1847,"children":1848},{"style":650},[1849],{"type":612,"value":747},{"type":606,"tag":644,"props":1851,"children":1852},{"style":750},[1853],{"type":612,"value":1254},{"type":606,"tag":644,"props":1855,"children":1856},{"style":734},[1857],{"type":612,"value":758},{"type":606,"tag":644,"props":1859,"children":1860},{"style":656},[1861],{"type":612,"value":1862},"current_time.hour",{"type":606,"tag":644,"props":1864,"children":1865},{"style":734},[1866],{"type":612,"value":768},{"type":606,"tag":644,"props":1868,"children":1869},{"style":750},[1870],{"type":612,"value":773},{"type":606,"tag":644,"props":1872,"children":1873},{"style":656},[1874],{"type":612,"value":778},{"type":606,"tag":644,"props":1876,"children":1877},{"class":646,"line":822},[1878,1882,1886,1890,1894,1898,1903,1907,1911],{"type":606,"tag":644,"props":1879,"children":1880},{"style":734},[1881],{"type":612,"value":737},{"type":606,"tag":644,"props":1883,"children":1884},{"style":656},[1885],{"type":612,"value":742},{"type":606,"tag":644,"props":1887,"children":1888},{"style":650},[1889],{"type":612,"value":747},{"type":606,"tag":644,"props":1891,"children":1892},{"style":750},[1893],{"type":612,"value":1295},{"type":606,"tag":644,"props":1895,"children":1896},{"style":734},[1897],{"type":612,"value":758},{"type":606,"tag":644,"props":1899,"children":1900},{"style":656},[1901],{"type":612,"value":1902},"current_time.minute",{"type":606,"tag":644,"props":1904,"children":1905},{"style":734},[1906],{"type":612,"value":768},{"type":606,"tag":644,"props":1908,"children":1909},{"style":750},[1910],{"type":612,"value":773},{"type":606,"tag":644,"props":1912,"children":1913},{"style":656},[1914],{"type":612,"value":778},{"type":606,"tag":644,"props":1916,"children":1917},{"class":646,"line":99},[1918,1922,1926,1930,1934,1938,1943,1947,1951],{"type":606,"tag":644,"props":1919,"children":1920},{"style":734},[1921],{"type":612,"value":737},{"type":606,"tag":644,"props":1923,"children":1924},{"style":656},[1925],{"type":612,"value":742},{"type":606,"tag":644,"props":1927,"children":1928},{"style":650},[1929],{"type":612,"value":747},{"type":606,"tag":644,"props":1931,"children":1932},{"style":750},[1933],{"type":612,"value":1336},{"type":606,"tag":644,"props":1935,"children":1936},{"style":734},[1937],{"type":612,"value":758},{"type":606,"tag":644,"props":1939,"children":1940},{"style":656},[1941],{"type":612,"value":1942},"current_time.second",{"type":606,"tag":644,"props":1944,"children":1945},{"style":734},[1946],{"type":612,"value":768},{"type":606,"tag":644,"props":1948,"children":1949},{"style":750},[1950],{"type":612,"value":773},{"type":606,"tag":644,"props":1952,"children":1953},{"style":656},[1954],{"type":612,"value":778},{"type":606,"tag":644,"props":1956,"children":1957},{"class":646,"line":108},[1958,1962,1966,1970,1975,1979,1984,1988,1992],{"type":606,"tag":644,"props":1959,"children":1960},{"style":734},[1961],{"type":612,"value":737},{"type":606,"tag":644,"props":1963,"children":1964},{"style":656},[1965],{"type":612,"value":742},{"type":606,"tag":644,"props":1967,"children":1968},{"style":650},[1969],{"type":612,"value":747},{"type":606,"tag":644,"props":1971,"children":1972},{"style":750},[1973],{"type":612,"value":1974},"\"Microsecond: ",{"type":606,"tag":644,"props":1976,"children":1977},{"style":734},[1978],{"type":612,"value":758},{"type":606,"tag":644,"props":1980,"children":1981},{"style":656},[1982],{"type":612,"value":1983},"current_time.microsecond",{"type":606,"tag":644,"props":1985,"children":1986},{"style":734},[1987],{"type":612,"value":768},{"type":606,"tag":644,"props":1989,"children":1990},{"style":750},[1991],{"type":612,"value":773},{"type":606,"tag":644,"props":1993,"children":1994},{"style":656},[1995],{"type":612,"value":778},{"type":606,"tag":863,"props":1997,"children":1999},{"id":1998},"utc-vs-local-time",[2000],{"type":612,"value":2001},"🌍 UTC vs Local Time",{"type":606,"tag":615,"props":2003,"children":2004},{},[2005],{"type":612,"value":2006},"Understanding the difference between local time and UTC is crucial for applications.",{"type":606,"tag":875,"props":2008,"children":2012},{"emoji":2009,"title":2010,"type":2011},"🌍","UTC vs Local Time","warning",[2013,2028,2046,2060],{"type":606,"tag":615,"props":2014,"children":2015},{},[2016],{"type":606,"tag":885,"props":2017,"children":2018},{},[2019,2021,2026],{"type":612,"value":2020},"Local Time (",{"type":606,"tag":621,"props":2022,"children":2024},{"className":2023},[],[2025],{"type":612,"value":903},{"type":612,"value":2027},"):",{"type":606,"tag":891,"props":2029,"children":2030},{},[2031,2036,2041],{"type":606,"tag":895,"props":2032,"children":2033},{},[2034],{"type":612,"value":2035},"Uses your system's time zone",{"type":606,"tag":895,"props":2037,"children":2038},{},[2039],{"type":612,"value":2040},"Good for local applications",{"type":606,"tag":895,"props":2042,"children":2043},{},[2044],{"type":612,"value":2045},"Can cause issues across time zones",{"type":606,"tag":615,"props":2047,"children":2048},{},[2049],{"type":606,"tag":885,"props":2050,"children":2051},{},[2052,2054,2059],{"type":612,"value":2053},"UTC Time (",{"type":606,"tag":621,"props":2055,"children":2057},{"className":2056},[],[2058],{"type":612,"value":925},{"type":612,"value":2027},{"type":606,"tag":891,"props":2061,"children":2062},{},[2063,2068,2073,2078],{"type":606,"tag":895,"props":2064,"children":2065},{},[2066],{"type":612,"value":2067},"Universal Coordinated Time",{"type":606,"tag":895,"props":2069,"children":2070},{},[2071],{"type":612,"value":2072},"Same everywhere in the world",{"type":606,"tag":895,"props":2074,"children":2075},{},[2076],{"type":612,"value":2077},"Better for distributed systems",{"type":606,"tag":895,"props":2079,"children":2080},{},[2081],{"type":612,"value":2082},"Recommended for data storage",{"type":606,"tag":991,"props":2084,"children":2086},{"id":2085},"utc-time",[2087],{"type":612,"value":2088},"UTC Time",{"type":606,"tag":630,"props":2090,"children":2091},{},[2092],{"type":606,"tag":634,"props":2093,"children":2095},{"className":636,"code":2094,"language":638,"meta":8,"style":8},"from datetime import datetime\n\n# Get UTC time\nutc_now = datetime.utcnow()\nlocal_now = datetime.now()\n\nprint(f\"UTC time: {utc_now}\")\nprint(f\"Local time: {local_now}\")\n\n# Calculate time zone offset\noffset = local_now - utc_now\nprint(f\"Time zone offset: {offset}\")\n",[2096],{"type":606,"tag":621,"props":2097,"children":2098},{"__ignoreMap":8},[2099,2118,2125,2133,2150,2166,2173,2214,2255,2262,2270,2297],{"type":606,"tag":644,"props":2100,"children":2101},{"class":646,"line":12},[2102,2106,2110,2114],{"type":606,"tag":644,"props":2103,"children":2104},{"style":650},[2105],{"type":612,"value":653},{"type":606,"tag":644,"props":2107,"children":2108},{"style":656},[2109],{"type":612,"value":659},{"type":606,"tag":644,"props":2111,"children":2112},{"style":650},[2113],{"type":612,"value":664},{"type":606,"tag":644,"props":2115,"children":2116},{"style":656},[2117],{"type":612,"value":1026},{"type":606,"tag":644,"props":2119,"children":2120},{"class":646,"line":27},[2121],{"type":606,"tag":644,"props":2122,"children":2123},{"emptyLinePlaceholder":13},[2124],{"type":612,"value":677},{"type":606,"tag":644,"props":2126,"children":2127},{"class":646,"line":36},[2128],{"type":606,"tag":644,"props":2129,"children":2130},{"style":683},[2131],{"type":612,"value":2132},"# Get UTC time\n",{"type":606,"tag":644,"props":2134,"children":2135},{"class":646,"line":45},[2136,2141,2145],{"type":606,"tag":644,"props":2137,"children":2138},{"style":656},[2139],{"type":612,"value":2140},"utc_now ",{"type":606,"tag":644,"props":2142,"children":2143},{"style":650},[2144],{"type":612,"value":699},{"type":606,"tag":644,"props":2146,"children":2147},{"style":656},[2148],{"type":612,"value":2149}," datetime.utcnow()\n",{"type":606,"tag":644,"props":2151,"children":2152},{"class":646,"line":54},[2153,2158,2162],{"type":606,"tag":644,"props":2154,"children":2155},{"style":656},[2156],{"type":612,"value":2157},"local_now ",{"type":606,"tag":644,"props":2159,"children":2160},{"style":650},[2161],{"type":612,"value":699},{"type":606,"tag":644,"props":2163,"children":2164},{"style":656},[2165],{"type":612,"value":704},{"type":606,"tag":644,"props":2167,"children":2168},{"class":646,"line":63},[2169],{"type":606,"tag":644,"props":2170,"children":2171},{"emptyLinePlaceholder":13},[2172],{"type":612,"value":677},{"type":606,"tag":644,"props":2174,"children":2175},{"class":646,"line":72},[2176,2180,2184,2188,2193,2197,2202,2206,2210],{"type":606,"tag":644,"props":2177,"children":2178},{"style":734},[2179],{"type":612,"value":737},{"type":606,"tag":644,"props":2181,"children":2182},{"style":656},[2183],{"type":612,"value":742},{"type":606,"tag":644,"props":2185,"children":2186},{"style":650},[2187],{"type":612,"value":747},{"type":606,"tag":644,"props":2189,"children":2190},{"style":750},[2191],{"type":612,"value":2192},"\"UTC time: ",{"type":606,"tag":644,"props":2194,"children":2195},{"style":734},[2196],{"type":612,"value":758},{"type":606,"tag":644,"props":2198,"children":2199},{"style":656},[2200],{"type":612,"value":2201},"utc_now",{"type":606,"tag":644,"props":2203,"children":2204},{"style":734},[2205],{"type":612,"value":768},{"type":606,"tag":644,"props":2207,"children":2208},{"style":750},[2209],{"type":612,"value":773},{"type":606,"tag":644,"props":2211,"children":2212},{"style":656},[2213],{"type":612,"value":778},{"type":606,"tag":644,"props":2215,"children":2216},{"class":646,"line":81},[2217,2221,2225,2229,2234,2238,2243,2247,2251],{"type":606,"tag":644,"props":2218,"children":2219},{"style":734},[2220],{"type":612,"value":737},{"type":606,"tag":644,"props":2222,"children":2223},{"style":656},[2224],{"type":612,"value":742},{"type":606,"tag":644,"props":2226,"children":2227},{"style":650},[2228],{"type":612,"value":747},{"type":606,"tag":644,"props":2230,"children":2231},{"style":750},[2232],{"type":612,"value":2233},"\"Local time: ",{"type":606,"tag":644,"props":2235,"children":2236},{"style":734},[2237],{"type":612,"value":758},{"type":606,"tag":644,"props":2239,"children":2240},{"style":656},[2241],{"type":612,"value":2242},"local_now",{"type":606,"tag":644,"props":2244,"children":2245},{"style":734},[2246],{"type":612,"value":768},{"type":606,"tag":644,"props":2248,"children":2249},{"style":750},[2250],{"type":612,"value":773},{"type":606,"tag":644,"props":2252,"children":2253},{"style":656},[2254],{"type":612,"value":778},{"type":606,"tag":644,"props":2256,"children":2257},{"class":646,"line":822},[2258],{"type":606,"tag":644,"props":2259,"children":2260},{"emptyLinePlaceholder":13},[2261],{"type":612,"value":677},{"type":606,"tag":644,"props":2263,"children":2264},{"class":646,"line":99},[2265],{"type":606,"tag":644,"props":2266,"children":2267},{"style":683},[2268],{"type":612,"value":2269},"# Calculate time zone offset\n",{"type":606,"tag":644,"props":2271,"children":2272},{"class":646,"line":108},[2273,2278,2282,2287,2292],{"type":606,"tag":644,"props":2274,"children":2275},{"style":656},[2276],{"type":612,"value":2277},"offset ",{"type":606,"tag":644,"props":2279,"children":2280},{"style":650},[2281],{"type":612,"value":699},{"type":606,"tag":644,"props":2283,"children":2284},{"style":656},[2285],{"type":612,"value":2286}," local_now ",{"type":606,"tag":644,"props":2288,"children":2289},{"style":650},[2290],{"type":612,"value":2291},"-",{"type":606,"tag":644,"props":2293,"children":2294},{"style":656},[2295],{"type":612,"value":2296}," utc_now\n",{"type":606,"tag":644,"props":2298,"children":2299},{"class":646,"line":117},[2300,2304,2308,2312,2317,2321,2326,2330,2334],{"type":606,"tag":644,"props":2301,"children":2302},{"style":734},[2303],{"type":612,"value":737},{"type":606,"tag":644,"props":2305,"children":2306},{"style":656},[2307],{"type":612,"value":742},{"type":606,"tag":644,"props":2309,"children":2310},{"style":650},[2311],{"type":612,"value":747},{"type":606,"tag":644,"props":2313,"children":2314},{"style":750},[2315],{"type":612,"value":2316},"\"Time zone offset: ",{"type":606,"tag":644,"props":2318,"children":2319},{"style":734},[2320],{"type":612,"value":758},{"type":606,"tag":644,"props":2322,"children":2323},{"style":656},[2324],{"type":612,"value":2325},"offset",{"type":606,"tag":644,"props":2327,"children":2328},{"style":734},[2329],{"type":612,"value":768},{"type":606,"tag":644,"props":2331,"children":2332},{"style":750},[2333],{"type":612,"value":773},{"type":606,"tag":644,"props":2335,"children":2336},{"style":656},[2337],{"type":612,"value":778},{"type":606,"tag":991,"props":2339,"children":2341},{"id":2340},"timestamp-operations",[2342],{"type":612,"value":2343},"Timestamp Operations",{"type":606,"tag":630,"props":2345,"children":2346},{},[2347],{"type":606,"tag":634,"props":2348,"children":2350},{"className":636,"code":2349,"language":638,"meta":8,"style":8},"import time\nfrom datetime import datetime\n\n# Get Unix timestamp (seconds since 1970-01-01)\ntimestamp = time.time()\nprint(f\"Unix timestamp: {timestamp}\")\n\n# Convert timestamp to datetime\ndt = datetime.fromtimestamp(timestamp)\nprint(f\"From timestamp: {dt}\")\n\n# Get timestamp from datetime\ndt_timestamp = datetime.now().timestamp()\nprint(f\"DateTime timestamp: {dt_timestamp}\")\n",[2351],{"type":606,"tag":621,"props":2352,"children":2353},{"__ignoreMap":8},[2354,2366,2385,2392,2400,2417,2458,2465,2473,2490,2531,2538,2546,2563],{"type":606,"tag":644,"props":2355,"children":2356},{"class":646,"line":12},[2357,2361],{"type":606,"tag":644,"props":2358,"children":2359},{"style":650},[2360],{"type":612,"value":664},{"type":606,"tag":644,"props":2362,"children":2363},{"style":656},[2364],{"type":612,"value":2365}," time\n",{"type":606,"tag":644,"props":2367,"children":2368},{"class":646,"line":27},[2369,2373,2377,2381],{"type":606,"tag":644,"props":2370,"children":2371},{"style":650},[2372],{"type":612,"value":653},{"type":606,"tag":644,"props":2374,"children":2375},{"style":656},[2376],{"type":612,"value":659},{"type":606,"tag":644,"props":2378,"children":2379},{"style":650},[2380],{"type":612,"value":664},{"type":606,"tag":644,"props":2382,"children":2383},{"style":656},[2384],{"type":612,"value":1026},{"type":606,"tag":644,"props":2386,"children":2387},{"class":646,"line":36},[2388],{"type":606,"tag":644,"props":2389,"children":2390},{"emptyLinePlaceholder":13},[2391],{"type":612,"value":677},{"type":606,"tag":644,"props":2393,"children":2394},{"class":646,"line":45},[2395],{"type":606,"tag":644,"props":2396,"children":2397},{"style":683},[2398],{"type":612,"value":2399},"# Get Unix timestamp (seconds since 1970-01-01)\n",{"type":606,"tag":644,"props":2401,"children":2402},{"class":646,"line":54},[2403,2408,2412],{"type":606,"tag":644,"props":2404,"children":2405},{"style":656},[2406],{"type":612,"value":2407},"timestamp ",{"type":606,"tag":644,"props":2409,"children":2410},{"style":650},[2411],{"type":612,"value":699},{"type":606,"tag":644,"props":2413,"children":2414},{"style":656},[2415],{"type":612,"value":2416}," time.time()\n",{"type":606,"tag":644,"props":2418,"children":2419},{"class":646,"line":63},[2420,2424,2428,2432,2437,2441,2446,2450,2454],{"type":606,"tag":644,"props":2421,"children":2422},{"style":734},[2423],{"type":612,"value":737},{"type":606,"tag":644,"props":2425,"children":2426},{"style":656},[2427],{"type":612,"value":742},{"type":606,"tag":644,"props":2429,"children":2430},{"style":650},[2431],{"type":612,"value":747},{"type":606,"tag":644,"props":2433,"children":2434},{"style":750},[2435],{"type":612,"value":2436},"\"Unix timestamp: ",{"type":606,"tag":644,"props":2438,"children":2439},{"style":734},[2440],{"type":612,"value":758},{"type":606,"tag":644,"props":2442,"children":2443},{"style":656},[2444],{"type":612,"value":2445},"timestamp",{"type":606,"tag":644,"props":2447,"children":2448},{"style":734},[2449],{"type":612,"value":768},{"type":606,"tag":644,"props":2451,"children":2452},{"style":750},[2453],{"type":612,"value":773},{"type":606,"tag":644,"props":2455,"children":2456},{"style":656},[2457],{"type":612,"value":778},{"type":606,"tag":644,"props":2459,"children":2460},{"class":646,"line":72},[2461],{"type":606,"tag":644,"props":2462,"children":2463},{"emptyLinePlaceholder":13},[2464],{"type":612,"value":677},{"type":606,"tag":644,"props":2466,"children":2467},{"class":646,"line":81},[2468],{"type":606,"tag":644,"props":2469,"children":2470},{"style":683},[2471],{"type":612,"value":2472},"# Convert timestamp to datetime\n",{"type":606,"tag":644,"props":2474,"children":2475},{"class":646,"line":822},[2476,2481,2485],{"type":606,"tag":644,"props":2477,"children":2478},{"style":656},[2479],{"type":612,"value":2480},"dt ",{"type":606,"tag":644,"props":2482,"children":2483},{"style":650},[2484],{"type":612,"value":699},{"type":606,"tag":644,"props":2486,"children":2487},{"style":656},[2488],{"type":612,"value":2489}," datetime.fromtimestamp(timestamp)\n",{"type":606,"tag":644,"props":2491,"children":2492},{"class":646,"line":99},[2493,2497,2501,2505,2510,2514,2519,2523,2527],{"type":606,"tag":644,"props":2494,"children":2495},{"style":734},[2496],{"type":612,"value":737},{"type":606,"tag":644,"props":2498,"children":2499},{"style":656},[2500],{"type":612,"value":742},{"type":606,"tag":644,"props":2502,"children":2503},{"style":650},[2504],{"type":612,"value":747},{"type":606,"tag":644,"props":2506,"children":2507},{"style":750},[2508],{"type":612,"value":2509},"\"From timestamp: ",{"type":606,"tag":644,"props":2511,"children":2512},{"style":734},[2513],{"type":612,"value":758},{"type":606,"tag":644,"props":2515,"children":2516},{"style":656},[2517],{"type":612,"value":2518},"dt",{"type":606,"tag":644,"props":2520,"children":2521},{"style":734},[2522],{"type":612,"value":768},{"type":606,"tag":644,"props":2524,"children":2525},{"style":750},[2526],{"type":612,"value":773},{"type":606,"tag":644,"props":2528,"children":2529},{"style":656},[2530],{"type":612,"value":778},{"type":606,"tag":644,"props":2532,"children":2533},{"class":646,"line":108},[2534],{"type":606,"tag":644,"props":2535,"children":2536},{"emptyLinePlaceholder":13},[2537],{"type":612,"value":677},{"type":606,"tag":644,"props":2539,"children":2540},{"class":646,"line":117},[2541],{"type":606,"tag":644,"props":2542,"children":2543},{"style":683},[2544],{"type":612,"value":2545},"# Get timestamp from datetime\n",{"type":606,"tag":644,"props":2547,"children":2548},{"class":646,"line":126},[2549,2554,2558],{"type":606,"tag":644,"props":2550,"children":2551},{"style":656},[2552],{"type":612,"value":2553},"dt_timestamp ",{"type":606,"tag":644,"props":2555,"children":2556},{"style":650},[2557],{"type":612,"value":699},{"type":606,"tag":644,"props":2559,"children":2560},{"style":656},[2561],{"type":612,"value":2562}," datetime.now().timestamp()\n",{"type":606,"tag":644,"props":2564,"children":2565},{"class":646,"line":135},[2566,2570,2574,2578,2583,2587,2592,2596,2600],{"type":606,"tag":644,"props":2567,"children":2568},{"style":734},[2569],{"type":612,"value":737},{"type":606,"tag":644,"props":2571,"children":2572},{"style":656},[2573],{"type":612,"value":742},{"type":606,"tag":644,"props":2575,"children":2576},{"style":650},[2577],{"type":612,"value":747},{"type":606,"tag":644,"props":2579,"children":2580},{"style":750},[2581],{"type":612,"value":2582},"\"DateTime timestamp: ",{"type":606,"tag":644,"props":2584,"children":2585},{"style":734},[2586],{"type":612,"value":758},{"type":606,"tag":644,"props":2588,"children":2589},{"style":656},[2590],{"type":612,"value":2591},"dt_timestamp",{"type":606,"tag":644,"props":2593,"children":2594},{"style":734},[2595],{"type":612,"value":768},{"type":606,"tag":644,"props":2597,"children":2598},{"style":750},[2599],{"type":612,"value":773},{"type":606,"tag":644,"props":2601,"children":2602},{"style":656},[2603],{"type":612,"value":778},{"type":606,"tag":863,"props":2605,"children":2607},{"id":2606},"practical-examples",[2608],{"type":612,"value":2609},"📅 Practical Examples",{"type":606,"tag":615,"props":2611,"children":2612},{},[2613],{"type":612,"value":2614},"Let's see how to use current date/time in real applications.",{"type":606,"tag":991,"props":2616,"children":2618},{"id":2617},"logging-and-timestamps",[2619],{"type":612,"value":2620},"Logging and Timestamps",{"type":606,"tag":630,"props":2622,"children":2623},{},[2624],{"type":606,"tag":634,"props":2625,"children":2627},{"className":636,"code":2626,"language":638,"meta":8,"style":8},"from datetime import datetime\n\ndef log_event(message):\n    \"\"\"Simple logging with timestamp\"\"\"\n    timestamp = datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\")\n    print(f\"[{timestamp}] {message}\")\n\n# Example usage\nlog_event(\"Application started\")\nlog_event(\"User logged in\")\nlog_event(\"Processing data\")\nlog_event(\"Operation completed\")\n",[2628],{"type":606,"tag":621,"props":2629,"children":2630},{"__ignoreMap":8},[2631,2650,2657,2676,2684,2720,2779,2786,2794,2811,2827,2843],{"type":606,"tag":644,"props":2632,"children":2633},{"class":646,"line":12},[2634,2638,2642,2646],{"type":606,"tag":644,"props":2635,"children":2636},{"style":650},[2637],{"type":612,"value":653},{"type":606,"tag":644,"props":2639,"children":2640},{"style":656},[2641],{"type":612,"value":659},{"type":606,"tag":644,"props":2643,"children":2644},{"style":650},[2645],{"type":612,"value":664},{"type":606,"tag":644,"props":2647,"children":2648},{"style":656},[2649],{"type":612,"value":1026},{"type":606,"tag":644,"props":2651,"children":2652},{"class":646,"line":27},[2653],{"type":606,"tag":644,"props":2654,"children":2655},{"emptyLinePlaceholder":13},[2656],{"type":612,"value":677},{"type":606,"tag":644,"props":2658,"children":2659},{"class":646,"line":36},[2660,2665,2671],{"type":606,"tag":644,"props":2661,"children":2662},{"style":650},[2663],{"type":612,"value":2664},"def",{"type":606,"tag":644,"props":2666,"children":2668},{"style":2667},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[2669],{"type":612,"value":2670}," log_event",{"type":606,"tag":644,"props":2672,"children":2673},{"style":656},[2674],{"type":612,"value":2675},"(message):\n",{"type":606,"tag":644,"props":2677,"children":2678},{"class":646,"line":45},[2679],{"type":606,"tag":644,"props":2680,"children":2681},{"style":750},[2682],{"type":612,"value":2683},"    \"\"\"Simple logging with timestamp\"\"\"\n",{"type":606,"tag":644,"props":2685,"children":2686},{"class":646,"line":54},[2687,2692,2696,2701,2706,2711,2716],{"type":606,"tag":644,"props":2688,"children":2689},{"style":656},[2690],{"type":612,"value":2691},"    timestamp ",{"type":606,"tag":644,"props":2693,"children":2694},{"style":650},[2695],{"type":612,"value":699},{"type":606,"tag":644,"props":2697,"children":2698},{"style":656},[2699],{"type":612,"value":2700}," datetime.now().strftime(",{"type":606,"tag":644,"props":2702,"children":2703},{"style":750},[2704],{"type":612,"value":2705},"\"%Y-%m-",{"type":606,"tag":644,"props":2707,"children":2708},{"style":734},[2709],{"type":612,"value":2710},"%d",{"type":606,"tag":644,"props":2712,"children":2713},{"style":750},[2714],{"type":612,"value":2715}," %H:%M:%S\"",{"type":606,"tag":644,"props":2717,"children":2718},{"style":656},[2719],{"type":612,"value":778},{"type":606,"tag":644,"props":2721,"children":2722},{"class":646,"line":63},[2723,2728,2732,2736,2741,2745,2749,2753,2758,2762,2767,2771,2775],{"type":606,"tag":644,"props":2724,"children":2725},{"style":734},[2726],{"type":612,"value":2727},"    print",{"type":606,"tag":644,"props":2729,"children":2730},{"style":656},[2731],{"type":612,"value":742},{"type":606,"tag":644,"props":2733,"children":2734},{"style":650},[2735],{"type":612,"value":747},{"type":606,"tag":644,"props":2737,"children":2738},{"style":750},[2739],{"type":612,"value":2740},"\"[",{"type":606,"tag":644,"props":2742,"children":2743},{"style":734},[2744],{"type":612,"value":758},{"type":606,"tag":644,"props":2746,"children":2747},{"style":656},[2748],{"type":612,"value":2445},{"type":606,"tag":644,"props":2750,"children":2751},{"style":734},[2752],{"type":612,"value":768},{"type":606,"tag":644,"props":2754,"children":2755},{"style":750},[2756],{"type":612,"value":2757},"] ",{"type":606,"tag":644,"props":2759,"children":2760},{"style":734},[2761],{"type":612,"value":758},{"type":606,"tag":644,"props":2763,"children":2764},{"style":656},[2765],{"type":612,"value":2766},"message",{"type":606,"tag":644,"props":2768,"children":2769},{"style":734},[2770],{"type":612,"value":768},{"type":606,"tag":644,"props":2772,"children":2773},{"style":750},[2774],{"type":612,"value":773},{"type":606,"tag":644,"props":2776,"children":2777},{"style":656},[2778],{"type":612,"value":778},{"type":606,"tag":644,"props":2780,"children":2781},{"class":646,"line":72},[2782],{"type":606,"tag":644,"props":2783,"children":2784},{"emptyLinePlaceholder":13},[2785],{"type":612,"value":677},{"type":606,"tag":644,"props":2787,"children":2788},{"class":646,"line":81},[2789],{"type":606,"tag":644,"props":2790,"children":2791},{"style":683},[2792],{"type":612,"value":2793},"# Example usage\n",{"type":606,"tag":644,"props":2795,"children":2796},{"class":646,"line":822},[2797,2802,2807],{"type":606,"tag":644,"props":2798,"children":2799},{"style":656},[2800],{"type":612,"value":2801},"log_event(",{"type":606,"tag":644,"props":2803,"children":2804},{"style":750},[2805],{"type":612,"value":2806},"\"Application started\"",{"type":606,"tag":644,"props":2808,"children":2809},{"style":656},[2810],{"type":612,"value":778},{"type":606,"tag":644,"props":2812,"children":2813},{"class":646,"line":99},[2814,2818,2823],{"type":606,"tag":644,"props":2815,"children":2816},{"style":656},[2817],{"type":612,"value":2801},{"type":606,"tag":644,"props":2819,"children":2820},{"style":750},[2821],{"type":612,"value":2822},"\"User logged in\"",{"type":606,"tag":644,"props":2824,"children":2825},{"style":656},[2826],{"type":612,"value":778},{"type":606,"tag":644,"props":2828,"children":2829},{"class":646,"line":108},[2830,2834,2839],{"type":606,"tag":644,"props":2831,"children":2832},{"style":656},[2833],{"type":612,"value":2801},{"type":606,"tag":644,"props":2835,"children":2836},{"style":750},[2837],{"type":612,"value":2838},"\"Processing data\"",{"type":606,"tag":644,"props":2840,"children":2841},{"style":656},[2842],{"type":612,"value":778},{"type":606,"tag":644,"props":2844,"children":2845},{"class":646,"line":117},[2846,2850,2855],{"type":606,"tag":644,"props":2847,"children":2848},{"style":656},[2849],{"type":612,"value":2801},{"type":606,"tag":644,"props":2851,"children":2852},{"style":750},[2853],{"type":612,"value":2854},"\"Operation completed\"",{"type":606,"tag":644,"props":2856,"children":2857},{"style":656},[2858],{"type":612,"value":778},{"type":606,"tag":991,"props":2860,"children":2862},{"id":2861},"file-naming-with-dates",[2863],{"type":612,"value":2864},"File Naming with Dates",{"type":606,"tag":630,"props":2866,"children":2867},{},[2868],{"type":606,"tag":634,"props":2869,"children":2871},{"className":636,"code":2870,"language":638,"meta":8,"style":8},"from datetime import datetime\n\ndef create_filename(base_name, extension=\"txt\"):\n    \"\"\"Create filename with current date/time\"\"\"\n    timestamp = datetime.now().strftime(\"%Y%m%d_%H%M%S\")\n    return f\"{base_name}_{timestamp}.{extension}\"\n\n# Example usage\nlog_file = create_filename(\"application_log\", \"log\")\nbackup_file = create_filename(\"data_backup\", \"json\")\nreport_file = create_filename(\"daily_report\", \"pdf\")\n\nprint(f\"Log file: {log_file}\")\nprint(f\"Backup file: {backup_file}\")\nprint(f\"Report file: {report_file}\")\n",[2872],{"type":606,"tag":621,"props":2873,"children":2874},{"__ignoreMap":8},[2875,2894,2901,2932,2940,2973,3043,3050,3057,3093,3127,3161,3168,3209,3250],{"type":606,"tag":644,"props":2876,"children":2877},{"class":646,"line":12},[2878,2882,2886,2890],{"type":606,"tag":644,"props":2879,"children":2880},{"style":650},[2881],{"type":612,"value":653},{"type":606,"tag":644,"props":2883,"children":2884},{"style":656},[2885],{"type":612,"value":659},{"type":606,"tag":644,"props":2887,"children":2888},{"style":650},[2889],{"type":612,"value":664},{"type":606,"tag":644,"props":2891,"children":2892},{"style":656},[2893],{"type":612,"value":1026},{"type":606,"tag":644,"props":2895,"children":2896},{"class":646,"line":27},[2897],{"type":606,"tag":644,"props":2898,"children":2899},{"emptyLinePlaceholder":13},[2900],{"type":612,"value":677},{"type":606,"tag":644,"props":2902,"children":2903},{"class":646,"line":36},[2904,2908,2913,2918,2922,2927],{"type":606,"tag":644,"props":2905,"children":2906},{"style":650},[2907],{"type":612,"value":2664},{"type":606,"tag":644,"props":2909,"children":2910},{"style":2667},[2911],{"type":612,"value":2912}," create_filename",{"type":606,"tag":644,"props":2914,"children":2915},{"style":656},[2916],{"type":612,"value":2917},"(base_name, extension",{"type":606,"tag":644,"props":2919,"children":2920},{"style":650},[2921],{"type":612,"value":699},{"type":606,"tag":644,"props":2923,"children":2924},{"style":750},[2925],{"type":612,"value":2926},"\"txt\"",{"type":606,"tag":644,"props":2928,"children":2929},{"style":656},[2930],{"type":612,"value":2931},"):\n",{"type":606,"tag":644,"props":2933,"children":2934},{"class":646,"line":45},[2935],{"type":606,"tag":644,"props":2936,"children":2937},{"style":750},[2938],{"type":612,"value":2939},"    \"\"\"Create filename with current date/time\"\"\"\n",{"type":606,"tag":644,"props":2941,"children":2942},{"class":646,"line":54},[2943,2947,2951,2955,2960,2964,2969],{"type":606,"tag":644,"props":2944,"children":2945},{"style":656},[2946],{"type":612,"value":2691},{"type":606,"tag":644,"props":2948,"children":2949},{"style":650},[2950],{"type":612,"value":699},{"type":606,"tag":644,"props":2952,"children":2953},{"style":656},[2954],{"type":612,"value":2700},{"type":606,"tag":644,"props":2956,"children":2957},{"style":750},[2958],{"type":612,"value":2959},"\"%Y%m",{"type":606,"tag":644,"props":2961,"children":2962},{"style":734},[2963],{"type":612,"value":2710},{"type":606,"tag":644,"props":2965,"children":2966},{"style":750},[2967],{"type":612,"value":2968},"_%H%M%S\"",{"type":606,"tag":644,"props":2970,"children":2971},{"style":656},[2972],{"type":612,"value":778},{"type":606,"tag":644,"props":2974,"children":2975},{"class":646,"line":63},[2976,2981,2986,2990,2994,2999,3003,3008,3012,3016,3020,3025,3029,3034,3038],{"type":606,"tag":644,"props":2977,"children":2978},{"style":650},[2979],{"type":612,"value":2980},"    return",{"type":606,"tag":644,"props":2982,"children":2983},{"style":650},[2984],{"type":612,"value":2985}," f",{"type":606,"tag":644,"props":2987,"children":2988},{"style":750},[2989],{"type":612,"value":773},{"type":606,"tag":644,"props":2991,"children":2992},{"style":734},[2993],{"type":612,"value":758},{"type":606,"tag":644,"props":2995,"children":2996},{"style":656},[2997],{"type":612,"value":2998},"base_name",{"type":606,"tag":644,"props":3000,"children":3001},{"style":734},[3002],{"type":612,"value":768},{"type":606,"tag":644,"props":3004,"children":3005},{"style":750},[3006],{"type":612,"value":3007},"_",{"type":606,"tag":644,"props":3009,"children":3010},{"style":734},[3011],{"type":612,"value":758},{"type":606,"tag":644,"props":3013,"children":3014},{"style":656},[3015],{"type":612,"value":2445},{"type":606,"tag":644,"props":3017,"children":3018},{"style":734},[3019],{"type":612,"value":768},{"type":606,"tag":644,"props":3021,"children":3022},{"style":750},[3023],{"type":612,"value":3024},".",{"type":606,"tag":644,"props":3026,"children":3027},{"style":734},[3028],{"type":612,"value":758},{"type":606,"tag":644,"props":3030,"children":3031},{"style":656},[3032],{"type":612,"value":3033},"extension",{"type":606,"tag":644,"props":3035,"children":3036},{"style":734},[3037],{"type":612,"value":768},{"type":606,"tag":644,"props":3039,"children":3040},{"style":750},[3041],{"type":612,"value":3042},"\"\n",{"type":606,"tag":644,"props":3044,"children":3045},{"class":646,"line":72},[3046],{"type":606,"tag":644,"props":3047,"children":3048},{"emptyLinePlaceholder":13},[3049],{"type":612,"value":677},{"type":606,"tag":644,"props":3051,"children":3052},{"class":646,"line":81},[3053],{"type":606,"tag":644,"props":3054,"children":3055},{"style":683},[3056],{"type":612,"value":2793},{"type":606,"tag":644,"props":3058,"children":3059},{"class":646,"line":822},[3060,3065,3069,3074,3079,3084,3089],{"type":606,"tag":644,"props":3061,"children":3062},{"style":656},[3063],{"type":612,"value":3064},"log_file ",{"type":606,"tag":644,"props":3066,"children":3067},{"style":650},[3068],{"type":612,"value":699},{"type":606,"tag":644,"props":3070,"children":3071},{"style":656},[3072],{"type":612,"value":3073}," create_filename(",{"type":606,"tag":644,"props":3075,"children":3076},{"style":750},[3077],{"type":612,"value":3078},"\"application_log\"",{"type":606,"tag":644,"props":3080,"children":3081},{"style":656},[3082],{"type":612,"value":3083},", ",{"type":606,"tag":644,"props":3085,"children":3086},{"style":750},[3087],{"type":612,"value":3088},"\"log\"",{"type":606,"tag":644,"props":3090,"children":3091},{"style":656},[3092],{"type":612,"value":778},{"type":606,"tag":644,"props":3094,"children":3095},{"class":646,"line":99},[3096,3101,3105,3109,3114,3118,3123],{"type":606,"tag":644,"props":3097,"children":3098},{"style":656},[3099],{"type":612,"value":3100},"backup_file ",{"type":606,"tag":644,"props":3102,"children":3103},{"style":650},[3104],{"type":612,"value":699},{"type":606,"tag":644,"props":3106,"children":3107},{"style":656},[3108],{"type":612,"value":3073},{"type":606,"tag":644,"props":3110,"children":3111},{"style":750},[3112],{"type":612,"value":3113},"\"data_backup\"",{"type":606,"tag":644,"props":3115,"children":3116},{"style":656},[3117],{"type":612,"value":3083},{"type":606,"tag":644,"props":3119,"children":3120},{"style":750},[3121],{"type":612,"value":3122},"\"json\"",{"type":606,"tag":644,"props":3124,"children":3125},{"style":656},[3126],{"type":612,"value":778},{"type":606,"tag":644,"props":3128,"children":3129},{"class":646,"line":108},[3130,3135,3139,3143,3148,3152,3157],{"type":606,"tag":644,"props":3131,"children":3132},{"style":656},[3133],{"type":612,"value":3134},"report_file ",{"type":606,"tag":644,"props":3136,"children":3137},{"style":650},[3138],{"type":612,"value":699},{"type":606,"tag":644,"props":3140,"children":3141},{"style":656},[3142],{"type":612,"value":3073},{"type":606,"tag":644,"props":3144,"children":3145},{"style":750},[3146],{"type":612,"value":3147},"\"daily_report\"",{"type":606,"tag":644,"props":3149,"children":3150},{"style":656},[3151],{"type":612,"value":3083},{"type":606,"tag":644,"props":3153,"children":3154},{"style":750},[3155],{"type":612,"value":3156},"\"pdf\"",{"type":606,"tag":644,"props":3158,"children":3159},{"style":656},[3160],{"type":612,"value":778},{"type":606,"tag":644,"props":3162,"children":3163},{"class":646,"line":117},[3164],{"type":606,"tag":644,"props":3165,"children":3166},{"emptyLinePlaceholder":13},[3167],{"type":612,"value":677},{"type":606,"tag":644,"props":3169,"children":3170},{"class":646,"line":126},[3171,3175,3179,3183,3188,3192,3197,3201,3205],{"type":606,"tag":644,"props":3172,"children":3173},{"style":734},[3174],{"type":612,"value":737},{"type":606,"tag":644,"props":3176,"children":3177},{"style":656},[3178],{"type":612,"value":742},{"type":606,"tag":644,"props":3180,"children":3181},{"style":650},[3182],{"type":612,"value":747},{"type":606,"tag":644,"props":3184,"children":3185},{"style":750},[3186],{"type":612,"value":3187},"\"Log file: ",{"type":606,"tag":644,"props":3189,"children":3190},{"style":734},[3191],{"type":612,"value":758},{"type":606,"tag":644,"props":3193,"children":3194},{"style":656},[3195],{"type":612,"value":3196},"log_file",{"type":606,"tag":644,"props":3198,"children":3199},{"style":734},[3200],{"type":612,"value":768},{"type":606,"tag":644,"props":3202,"children":3203},{"style":750},[3204],{"type":612,"value":773},{"type":606,"tag":644,"props":3206,"children":3207},{"style":656},[3208],{"type":612,"value":778},{"type":606,"tag":644,"props":3210,"children":3211},{"class":646,"line":135},[3212,3216,3220,3224,3229,3233,3238,3242,3246],{"type":606,"tag":644,"props":3213,"children":3214},{"style":734},[3215],{"type":612,"value":737},{"type":606,"tag":644,"props":3217,"children":3218},{"style":656},[3219],{"type":612,"value":742},{"type":606,"tag":644,"props":3221,"children":3222},{"style":650},[3223],{"type":612,"value":747},{"type":606,"tag":644,"props":3225,"children":3226},{"style":750},[3227],{"type":612,"value":3228},"\"Backup file: ",{"type":606,"tag":644,"props":3230,"children":3231},{"style":734},[3232],{"type":612,"value":758},{"type":606,"tag":644,"props":3234,"children":3235},{"style":656},[3236],{"type":612,"value":3237},"backup_file",{"type":606,"tag":644,"props":3239,"children":3240},{"style":734},[3241],{"type":612,"value":768},{"type":606,"tag":644,"props":3243,"children":3244},{"style":750},[3245],{"type":612,"value":773},{"type":606,"tag":644,"props":3247,"children":3248},{"style":656},[3249],{"type":612,"value":778},{"type":606,"tag":644,"props":3251,"children":3252},{"class":646,"line":144},[3253,3257,3261,3265,3270,3274,3279,3283,3287],{"type":606,"tag":644,"props":3254,"children":3255},{"style":734},[3256],{"type":612,"value":737},{"type":606,"tag":644,"props":3258,"children":3259},{"style":656},[3260],{"type":612,"value":742},{"type":606,"tag":644,"props":3262,"children":3263},{"style":650},[3264],{"type":612,"value":747},{"type":606,"tag":644,"props":3266,"children":3267},{"style":750},[3268],{"type":612,"value":3269},"\"Report file: ",{"type":606,"tag":644,"props":3271,"children":3272},{"style":734},[3273],{"type":612,"value":758},{"type":606,"tag":644,"props":3275,"children":3276},{"style":656},[3277],{"type":612,"value":3278},"report_file",{"type":606,"tag":644,"props":3280,"children":3281},{"style":734},[3282],{"type":612,"value":768},{"type":606,"tag":644,"props":3284,"children":3285},{"style":750},[3286],{"type":612,"value":773},{"type":606,"tag":644,"props":3288,"children":3289},{"style":656},[3290],{"type":612,"value":778},{"type":606,"tag":991,"props":3292,"children":3294},{"id":3293},"age-calculation",[3295],{"type":612,"value":3296},"Age Calculation",{"type":606,"tag":630,"props":3298,"children":3299},{},[3300],{"type":606,"tag":634,"props":3301,"children":3303},{"className":636,"code":3302,"language":638,"meta":8,"style":8},"from datetime import date\n\ndef calculate_age(birth_date):\n    \"\"\"Calculate age from birth date\"\"\"\n    today = date.today()\n    \n    # Calculate age\n    age = today.year - birth_date.year\n    \n    # Adjust if birthday hasn't occurred this year\n    if today.month \u003C birth_date.month or (\n        today.month == birth_date.month and today.day \u003C birth_date.day\n    ):\n        age -= 1\n    \n    return age\n\n# Example usage\nbirth = date(1990, 5, 15)\nage = calculate_age(birth)\nprint(f\"Age: {age} years old\")\n\n# Days until next birthday\nnext_birthday = date(2024, 5, 15)  # Replace with current year\ndays_to_birthday = (next_birthday - date.today()).days\nprint(f\"Days to next birthday: {days_to_birthday}\")\n",[3304],{"type":606,"tag":621,"props":3305,"children":3306},{"__ignoreMap":8},[3307,3326,3333,3350,3358,3374,3382,3390,3416,3423,3431,3464,3500,3508,3526,3533,3545,3552,3559,3603,3620,3662,3669,3677,3724,3750],{"type":606,"tag":644,"props":3308,"children":3309},{"class":646,"line":12},[3310,3314,3318,3322],{"type":606,"tag":644,"props":3311,"children":3312},{"style":650},[3313],{"type":612,"value":653},{"type":606,"tag":644,"props":3315,"children":3316},{"style":656},[3317],{"type":612,"value":659},{"type":606,"tag":644,"props":3319,"children":3320},{"style":650},[3321],{"type":612,"value":664},{"type":606,"tag":644,"props":3323,"children":3324},{"style":656},[3325],{"type":612,"value":1393},{"type":606,"tag":644,"props":3327,"children":3328},{"class":646,"line":27},[3329],{"type":606,"tag":644,"props":3330,"children":3331},{"emptyLinePlaceholder":13},[3332],{"type":612,"value":677},{"type":606,"tag":644,"props":3334,"children":3335},{"class":646,"line":36},[3336,3340,3345],{"type":606,"tag":644,"props":3337,"children":3338},{"style":650},[3339],{"type":612,"value":2664},{"type":606,"tag":644,"props":3341,"children":3342},{"style":2667},[3343],{"type":612,"value":3344}," calculate_age",{"type":606,"tag":644,"props":3346,"children":3347},{"style":656},[3348],{"type":612,"value":3349},"(birth_date):\n",{"type":606,"tag":644,"props":3351,"children":3352},{"class":646,"line":45},[3353],{"type":606,"tag":644,"props":3354,"children":3355},{"style":750},[3356],{"type":612,"value":3357},"    \"\"\"Calculate age from birth date\"\"\"\n",{"type":606,"tag":644,"props":3359,"children":3360},{"class":646,"line":54},[3361,3366,3370],{"type":606,"tag":644,"props":3362,"children":3363},{"style":656},[3364],{"type":612,"value":3365},"    today ",{"type":606,"tag":644,"props":3367,"children":3368},{"style":650},[3369],{"type":612,"value":699},{"type":606,"tag":644,"props":3371,"children":3372},{"style":656},[3373],{"type":612,"value":721},{"type":606,"tag":644,"props":3375,"children":3376},{"class":646,"line":63},[3377],{"type":606,"tag":644,"props":3378,"children":3379},{"style":656},[3380],{"type":612,"value":3381},"    \n",{"type":606,"tag":644,"props":3383,"children":3384},{"class":646,"line":72},[3385],{"type":606,"tag":644,"props":3386,"children":3387},{"style":683},[3388],{"type":612,"value":3389},"    # Calculate age\n",{"type":606,"tag":644,"props":3391,"children":3392},{"class":646,"line":81},[3393,3398,3402,3407,3411],{"type":606,"tag":644,"props":3394,"children":3395},{"style":656},[3396],{"type":612,"value":3397},"    age ",{"type":606,"tag":644,"props":3399,"children":3400},{"style":650},[3401],{"type":612,"value":699},{"type":606,"tag":644,"props":3403,"children":3404},{"style":656},[3405],{"type":612,"value":3406}," today.year ",{"type":606,"tag":644,"props":3408,"children":3409},{"style":650},[3410],{"type":612,"value":2291},{"type":606,"tag":644,"props":3412,"children":3413},{"style":656},[3414],{"type":612,"value":3415}," birth_date.year\n",{"type":606,"tag":644,"props":3417,"children":3418},{"class":646,"line":822},[3419],{"type":606,"tag":644,"props":3420,"children":3421},{"style":656},[3422],{"type":612,"value":3381},{"type":606,"tag":644,"props":3424,"children":3425},{"class":646,"line":99},[3426],{"type":606,"tag":644,"props":3427,"children":3428},{"style":683},[3429],{"type":612,"value":3430},"    # Adjust if birthday hasn't occurred this year\n",{"type":606,"tag":644,"props":3432,"children":3433},{"class":646,"line":108},[3434,3439,3444,3449,3454,3459],{"type":606,"tag":644,"props":3435,"children":3436},{"style":650},[3437],{"type":612,"value":3438},"    if",{"type":606,"tag":644,"props":3440,"children":3441},{"style":656},[3442],{"type":612,"value":3443}," today.month ",{"type":606,"tag":644,"props":3445,"children":3446},{"style":650},[3447],{"type":612,"value":3448},"\u003C",{"type":606,"tag":644,"props":3450,"children":3451},{"style":656},[3452],{"type":612,"value":3453}," birth_date.month ",{"type":606,"tag":644,"props":3455,"children":3456},{"style":650},[3457],{"type":612,"value":3458},"or",{"type":606,"tag":644,"props":3460,"children":3461},{"style":656},[3462],{"type":612,"value":3463}," (\n",{"type":606,"tag":644,"props":3465,"children":3466},{"class":646,"line":117},[3467,3472,3477,3481,3486,3491,3495],{"type":606,"tag":644,"props":3468,"children":3469},{"style":656},[3470],{"type":612,"value":3471},"        today.month ",{"type":606,"tag":644,"props":3473,"children":3474},{"style":650},[3475],{"type":612,"value":3476},"==",{"type":606,"tag":644,"props":3478,"children":3479},{"style":656},[3480],{"type":612,"value":3453},{"type":606,"tag":644,"props":3482,"children":3483},{"style":650},[3484],{"type":612,"value":3485},"and",{"type":606,"tag":644,"props":3487,"children":3488},{"style":656},[3489],{"type":612,"value":3490}," today.day ",{"type":606,"tag":644,"props":3492,"children":3493},{"style":650},[3494],{"type":612,"value":3448},{"type":606,"tag":644,"props":3496,"children":3497},{"style":656},[3498],{"type":612,"value":3499}," birth_date.day\n",{"type":606,"tag":644,"props":3501,"children":3502},{"class":646,"line":126},[3503],{"type":606,"tag":644,"props":3504,"children":3505},{"style":656},[3506],{"type":612,"value":3507},"    ):\n",{"type":606,"tag":644,"props":3509,"children":3510},{"class":646,"line":135},[3511,3516,3521],{"type":606,"tag":644,"props":3512,"children":3513},{"style":656},[3514],{"type":612,"value":3515},"        age ",{"type":606,"tag":644,"props":3517,"children":3518},{"style":650},[3519],{"type":612,"value":3520},"-=",{"type":606,"tag":644,"props":3522,"children":3523},{"style":734},[3524],{"type":612,"value":3525}," 1\n",{"type":606,"tag":644,"props":3527,"children":3528},{"class":646,"line":144},[3529],{"type":606,"tag":644,"props":3530,"children":3531},{"style":656},[3532],{"type":612,"value":3381},{"type":606,"tag":644,"props":3534,"children":3535},{"class":646,"line":153},[3536,3540],{"type":606,"tag":644,"props":3537,"children":3538},{"style":650},[3539],{"type":612,"value":2980},{"type":606,"tag":644,"props":3541,"children":3542},{"style":656},[3543],{"type":612,"value":3544}," age\n",{"type":606,"tag":644,"props":3546,"children":3547},{"class":646,"line":163},[3548],{"type":606,"tag":644,"props":3549,"children":3550},{"emptyLinePlaceholder":13},[3551],{"type":612,"value":677},{"type":606,"tag":644,"props":3553,"children":3554},{"class":646,"line":172},[3555],{"type":606,"tag":644,"props":3556,"children":3557},{"style":683},[3558],{"type":612,"value":2793},{"type":606,"tag":644,"props":3560,"children":3561},{"class":646,"line":181},[3562,3567,3571,3576,3581,3585,3590,3594,3599],{"type":606,"tag":644,"props":3563,"children":3564},{"style":656},[3565],{"type":612,"value":3566},"birth ",{"type":606,"tag":644,"props":3568,"children":3569},{"style":650},[3570],{"type":612,"value":699},{"type":606,"tag":644,"props":3572,"children":3573},{"style":656},[3574],{"type":612,"value":3575}," date(",{"type":606,"tag":644,"props":3577,"children":3578},{"style":734},[3579],{"type":612,"value":3580},"1990",{"type":606,"tag":644,"props":3582,"children":3583},{"style":656},[3584],{"type":612,"value":3083},{"type":606,"tag":644,"props":3586,"children":3587},{"style":734},[3588],{"type":612,"value":3589},"5",{"type":606,"tag":644,"props":3591,"children":3592},{"style":656},[3593],{"type":612,"value":3083},{"type":606,"tag":644,"props":3595,"children":3596},{"style":734},[3597],{"type":612,"value":3598},"15",{"type":606,"tag":644,"props":3600,"children":3601},{"style":656},[3602],{"type":612,"value":778},{"type":606,"tag":644,"props":3604,"children":3605},{"class":646,"line":190},[3606,3611,3615],{"type":606,"tag":644,"props":3607,"children":3608},{"style":656},[3609],{"type":612,"value":3610},"age ",{"type":606,"tag":644,"props":3612,"children":3613},{"style":650},[3614],{"type":612,"value":699},{"type":606,"tag":644,"props":3616,"children":3617},{"style":656},[3618],{"type":612,"value":3619}," calculate_age(birth)\n",{"type":606,"tag":644,"props":3621,"children":3622},{"class":646,"line":199},[3623,3627,3631,3635,3640,3644,3649,3653,3658],{"type":606,"tag":644,"props":3624,"children":3625},{"style":734},[3626],{"type":612,"value":737},{"type":606,"tag":644,"props":3628,"children":3629},{"style":656},[3630],{"type":612,"value":742},{"type":606,"tag":644,"props":3632,"children":3633},{"style":650},[3634],{"type":612,"value":747},{"type":606,"tag":644,"props":3636,"children":3637},{"style":750},[3638],{"type":612,"value":3639},"\"Age: ",{"type":606,"tag":644,"props":3641,"children":3642},{"style":734},[3643],{"type":612,"value":758},{"type":606,"tag":644,"props":3645,"children":3646},{"style":656},[3647],{"type":612,"value":3648},"age",{"type":606,"tag":644,"props":3650,"children":3651},{"style":734},[3652],{"type":612,"value":768},{"type":606,"tag":644,"props":3654,"children":3655},{"style":750},[3656],{"type":612,"value":3657}," years old\"",{"type":606,"tag":644,"props":3659,"children":3660},{"style":656},[3661],{"type":612,"value":778},{"type":606,"tag":644,"props":3663,"children":3664},{"class":646,"line":208},[3665],{"type":606,"tag":644,"props":3666,"children":3667},{"emptyLinePlaceholder":13},[3668],{"type":612,"value":677},{"type":606,"tag":644,"props":3670,"children":3671},{"class":646,"line":217},[3672],{"type":606,"tag":644,"props":3673,"children":3674},{"style":683},[3675],{"type":612,"value":3676},"# Days until next birthday\n",{"type":606,"tag":644,"props":3678,"children":3679},{"class":646,"line":227},[3680,3685,3689,3693,3698,3702,3706,3710,3714,3719],{"type":606,"tag":644,"props":3681,"children":3682},{"style":656},[3683],{"type":612,"value":3684},"next_birthday ",{"type":606,"tag":644,"props":3686,"children":3687},{"style":650},[3688],{"type":612,"value":699},{"type":606,"tag":644,"props":3690,"children":3691},{"style":656},[3692],{"type":612,"value":3575},{"type":606,"tag":644,"props":3694,"children":3695},{"style":734},[3696],{"type":612,"value":3697},"2024",{"type":606,"tag":644,"props":3699,"children":3700},{"style":656},[3701],{"type":612,"value":3083},{"type":606,"tag":644,"props":3703,"children":3704},{"style":734},[3705],{"type":612,"value":3589},{"type":606,"tag":644,"props":3707,"children":3708},{"style":656},[3709],{"type":612,"value":3083},{"type":606,"tag":644,"props":3711,"children":3712},{"style":734},[3713],{"type":612,"value":3598},{"type":606,"tag":644,"props":3715,"children":3716},{"style":656},[3717],{"type":612,"value":3718},")  ",{"type":606,"tag":644,"props":3720,"children":3721},{"style":683},[3722],{"type":612,"value":3723},"# Replace with current year\n",{"type":606,"tag":644,"props":3725,"children":3726},{"class":646,"line":236},[3727,3732,3736,3741,3745],{"type":606,"tag":644,"props":3728,"children":3729},{"style":656},[3730],{"type":612,"value":3731},"days_to_birthday ",{"type":606,"tag":644,"props":3733,"children":3734},{"style":650},[3735],{"type":612,"value":699},{"type":606,"tag":644,"props":3737,"children":3738},{"style":656},[3739],{"type":612,"value":3740}," (next_birthday ",{"type":606,"tag":644,"props":3742,"children":3743},{"style":650},[3744],{"type":612,"value":2291},{"type":606,"tag":644,"props":3746,"children":3747},{"style":656},[3748],{"type":612,"value":3749}," date.today()).days\n",{"type":606,"tag":644,"props":3751,"children":3752},{"class":646,"line":245},[3753,3757,3761,3765,3770,3774,3779,3783,3787],{"type":606,"tag":644,"props":3754,"children":3755},{"style":734},[3756],{"type":612,"value":737},{"type":606,"tag":644,"props":3758,"children":3759},{"style":656},[3760],{"type":612,"value":742},{"type":606,"tag":644,"props":3762,"children":3763},{"style":650},[3764],{"type":612,"value":747},{"type":606,"tag":644,"props":3766,"children":3767},{"style":750},[3768],{"type":612,"value":3769},"\"Days to next birthday: ",{"type":606,"tag":644,"props":3771,"children":3772},{"style":734},[3773],{"type":612,"value":758},{"type":606,"tag":644,"props":3775,"children":3776},{"style":656},[3777],{"type":612,"value":3778},"days_to_birthday",{"type":606,"tag":644,"props":3780,"children":3781},{"style":734},[3782],{"type":612,"value":768},{"type":606,"tag":644,"props":3784,"children":3785},{"style":750},[3786],{"type":612,"value":773},{"type":606,"tag":644,"props":3788,"children":3789},{"style":656},[3790],{"type":612,"value":778},{"type":606,"tag":863,"props":3792,"children":3794},{"id":3793},"time-methods-reference",[3795],{"type":612,"value":3796},"📊 Time Methods Reference",{"type":606,"tag":3798,"props":3799,"children":3800},"table",{},[3801,3830],{"type":606,"tag":3802,"props":3803,"children":3804},"thead",{},[3805],{"type":606,"tag":3806,"props":3807,"children":3808},"tr",{},[3809,3815,3820,3825],{"type":606,"tag":3810,"props":3811,"children":3812},"th",{},[3813],{"type":612,"value":3814},"Method",{"type":606,"tag":3810,"props":3816,"children":3817},{},[3818],{"type":612,"value":3819},"Returns",{"type":606,"tag":3810,"props":3821,"children":3822},{},[3823],{"type":612,"value":3824},"Use Case",{"type":606,"tag":3810,"props":3826,"children":3827},{},[3828],{"type":612,"value":3829},"Example",{"type":606,"tag":3831,"props":3832,"children":3833},"tbody",{},[3834,3865,3895,3925,3955],{"type":606,"tag":3806,"props":3835,"children":3836},{},[3837,3846,3851,3856],{"type":606,"tag":3838,"props":3839,"children":3840},"td",{},[3841],{"type":606,"tag":621,"props":3842,"children":3844},{"className":3843},[],[3845],{"type":612,"value":903},{"type":606,"tag":3838,"props":3847,"children":3848},{},[3849],{"type":612,"value":3850},"Local datetime",{"type":606,"tag":3838,"props":3852,"children":3853},{},[3854],{"type":612,"value":3855},"General timestamps",{"type":606,"tag":3838,"props":3857,"children":3858},{},[3859],{"type":606,"tag":621,"props":3860,"children":3862},{"className":3861},[],[3863],{"type":612,"value":3864},"2024-03-15 14:30:45",{"type":606,"tag":3806,"props":3866,"children":3867},{},[3868,3876,3881,3886],{"type":606,"tag":3838,"props":3869,"children":3870},{},[3871],{"type":606,"tag":621,"props":3872,"children":3874},{"className":3873},[],[3875],{"type":612,"value":914},{"type":606,"tag":3838,"props":3877,"children":3878},{},[3879],{"type":612,"value":3880},"Current date",{"type":606,"tag":3838,"props":3882,"children":3883},{},[3884],{"type":612,"value":3885},"Daily operations",{"type":606,"tag":3838,"props":3887,"children":3888},{},[3889],{"type":606,"tag":621,"props":3890,"children":3892},{"className":3891},[],[3893],{"type":612,"value":3894},"2024-03-15",{"type":606,"tag":3806,"props":3896,"children":3897},{},[3898,3906,3911,3916],{"type":606,"tag":3838,"props":3899,"children":3900},{},[3901],{"type":606,"tag":621,"props":3902,"children":3904},{"className":3903},[],[3905],{"type":612,"value":925},{"type":606,"tag":3838,"props":3907,"children":3908},{},[3909],{"type":612,"value":3910},"UTC datetime",{"type":606,"tag":3838,"props":3912,"children":3913},{},[3914],{"type":612,"value":3915},"Global applications",{"type":606,"tag":3838,"props":3917,"children":3918},{},[3919],{"type":606,"tag":621,"props":3920,"children":3922},{"className":3921},[],[3923],{"type":612,"value":3924},"2024-03-15 19:30:45",{"type":606,"tag":3806,"props":3926,"children":3927},{},[3928,3936,3941,3946],{"type":606,"tag":3838,"props":3929,"children":3930},{},[3931],{"type":606,"tag":621,"props":3932,"children":3934},{"className":3933},[],[3935],{"type":612,"value":936},{"type":606,"tag":3838,"props":3937,"children":3938},{},[3939],{"type":612,"value":3940},"Unix timestamp",{"type":606,"tag":3838,"props":3942,"children":3943},{},[3944],{"type":612,"value":3945},"Performance timing",{"type":606,"tag":3838,"props":3947,"children":3948},{},[3949],{"type":606,"tag":621,"props":3950,"children":3952},{"className":3951},[],[3953],{"type":612,"value":3954},"1710519045.123",{"type":606,"tag":3806,"props":3956,"children":3957},{},[3958,3967,3972,3977],{"type":606,"tag":3838,"props":3959,"children":3960},{},[3961],{"type":606,"tag":621,"props":3962,"children":3964},{"className":3963},[],[3965],{"type":612,"value":3966},"datetime.fromtimestamp()",{"type":606,"tag":3838,"props":3968,"children":3969},{},[3970],{"type":612,"value":3971},"DateTime from timestamp",{"type":606,"tag":3838,"props":3973,"children":3974},{},[3975],{"type":612,"value":3976},"Convert timestamps",{"type":606,"tag":3838,"props":3978,"children":3979},{},[3980,3982],{"type":612,"value":3981},"Convert ",{"type":606,"tag":621,"props":3983,"children":3985},{"className":3984},[],[3986],{"type":612,"value":3987},"1710519045",{"type":606,"tag":863,"props":3989,"children":3991},{"id":3990},"key-takeaways",[3992],{"type":612,"value":3993},"🎯 Key Takeaways",{"type":606,"tag":875,"props":3995,"children":3999},{"emoji":3996,"title":3997,"type":3998},"📚","Current Date/Time Essentials","success",[4000,4008,4050,4058,4122,4130,4153],{"type":606,"tag":615,"props":4001,"children":4002},{},[4003],{"type":606,"tag":885,"props":4004,"children":4005},{},[4006],{"type":612,"value":4007},"Getting Current Values:",{"type":606,"tag":891,"props":4009,"children":4010},{},[4011,4021,4031,4041],{"type":606,"tag":895,"props":4012,"children":4013},{},[4014,4019],{"type":606,"tag":621,"props":4015,"children":4017},{"className":4016},[],[4018],{"type":612,"value":903},{"type":612,"value":4020},": Full date and time",{"type":606,"tag":895,"props":4022,"children":4023},{},[4024,4029],{"type":606,"tag":621,"props":4025,"children":4027},{"className":4026},[],[4028],{"type":612,"value":914},{"type":612,"value":4030},": Date only",{"type":606,"tag":895,"props":4032,"children":4033},{},[4034,4039],{"type":606,"tag":621,"props":4035,"children":4037},{"className":4036},[],[4038],{"type":612,"value":925},{"type":612,"value":4040},": UTC time",{"type":606,"tag":895,"props":4042,"children":4043},{},[4044,4049],{"type":606,"tag":621,"props":4045,"children":4047},{"className":4046},[],[4048],{"type":612,"value":936},{"type":612,"value":938},{"type":606,"tag":615,"props":4051,"children":4052},{},[4053],{"type":606,"tag":885,"props":4054,"children":4055},{},[4056],{"type":612,"value":4057},"Components Access:",{"type":606,"tag":891,"props":4059,"children":4060},{},[4061,4086,4111],{"type":606,"tag":895,"props":4062,"children":4063},{},[4064,4070,4071,4077,4078,4084],{"type":606,"tag":621,"props":4065,"children":4067},{"className":4066},[],[4068],{"type":612,"value":4069},".year",{"type":612,"value":3083},{"type":606,"tag":621,"props":4072,"children":4074},{"className":4073},[],[4075],{"type":612,"value":4076},".month",{"type":612,"value":3083},{"type":606,"tag":621,"props":4079,"children":4081},{"className":4080},[],[4082],{"type":612,"value":4083},".day",{"type":612,"value":4085}," for dates",{"type":606,"tag":895,"props":4087,"children":4088},{},[4089,4095,4096,4102,4103,4109],{"type":606,"tag":621,"props":4090,"children":4092},{"className":4091},[],[4093],{"type":612,"value":4094},".hour",{"type":612,"value":3083},{"type":606,"tag":621,"props":4097,"children":4099},{"className":4098},[],[4100],{"type":612,"value":4101},".minute",{"type":612,"value":3083},{"type":606,"tag":621,"props":4104,"children":4106},{"className":4105},[],[4107],{"type":612,"value":4108},".second",{"type":612,"value":4110}," for times",{"type":606,"tag":895,"props":4112,"children":4113},{},[4114,4120],{"type":606,"tag":621,"props":4115,"children":4117},{"className":4116},[],[4118],{"type":612,"value":4119},".weekday()",{"type":612,"value":4121}," for day of week",{"type":606,"tag":615,"props":4123,"children":4124},{},[4125],{"type":606,"tag":885,"props":4126,"children":4127},{},[4128],{"type":612,"value":4129},"Best Practices:",{"type":606,"tag":891,"props":4131,"children":4132},{},[4133,4138,4143,4148],{"type":606,"tag":895,"props":4134,"children":4135},{},[4136],{"type":612,"value":4137},"Use UTC for data storage",{"type":606,"tag":895,"props":4139,"children":4140},{},[4141],{"type":612,"value":4142},"Use local time for user display",{"type":606,"tag":895,"props":4144,"children":4145},{},[4146],{"type":612,"value":4147},"Include timestamps in logs",{"type":606,"tag":895,"props":4149,"children":4150},{},[4151],{"type":612,"value":4152},"Consider time zones for global apps",{"type":606,"tag":615,"props":4154,"children":4155},{},[4156,4161],{"type":606,"tag":885,"props":4157,"children":4158},{},[4159],{"type":612,"value":4160},"Remember:",{"type":612,"value":4162}," Always be explicit about time zones in applications!",{"type":606,"tag":863,"props":4164,"children":4166},{"id":4165},"whats-next",[4167],{"type":612,"value":4168},"🚀 What's Next?",{"type":606,"tag":615,"props":4170,"children":4171},{},[4172],{"type":612,"value":4173},"Now that you can get current dates and times, learn how to format them for display and user interfaces.",{"type":606,"tag":615,"props":4175,"children":4176},{},[4177,4182,4184],{"type":606,"tag":885,"props":4178,"children":4179},{},[4180],{"type":612,"value":4181},"Continue to",{"type":612,"value":4183},": ",{"type":606,"tag":4185,"props":4186,"children":4187},"a",{"href":307},[4188],{"type":612,"value":308},{"type":606,"tag":4190,"props":4191,"children":4192},"style",{},[4193],{"type":612,"value":4194},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}html.app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}",{"title":8,"searchDepth":36,"depth":36,"links":4196},[4197,4202,4206,4211,4212,4213],{"id":865,"depth":27,"text":868,"children":4198},[4199,4200,4201],{"id":993,"depth":36,"text":996},{"id":1360,"depth":36,"text":1363},{"id":1708,"depth":36,"text":1711},{"id":1998,"depth":27,"text":2001,"children":4203},[4204,4205],{"id":2085,"depth":36,"text":2088},{"id":2340,"depth":36,"text":2343},{"id":2606,"depth":27,"text":2609,"children":4207},[4208,4209,4210],{"id":2617,"depth":36,"text":2620},{"id":2861,"depth":36,"text":2864},{"id":3293,"depth":36,"text":3296},{"id":3793,"depth":27,"text":3796},{"id":3990,"depth":27,"text":3993},{"id":4165,"depth":27,"text":4168},1782373758154]