{"id":44166,"date":"2025-08-07T14:31:23","date_gmt":"2025-08-07T05:31:23","guid":{"rendered":"https:\/\/techgym.jp\/?p=44166"},"modified":"2025-10-20T00:04:43","modified_gmt":"2025-10-19T15:04:43","slug":"python-datetime-2","status":"publish","type":"post","link":"https:\/\/techgym.jp\/column\/python-datetime-2\/","title":{"rendered":"Python datetime\u7d4c\u904e\u6642\u9593\u30fb\u6642\u9593\u5dee\u306e\u8a08\u7b97\u65b9\u6cd5\u3010\u5b8c\u5168\u89e3\u8aac\u3011"},"content":{"rendered":"\n<p><iframe loading=\"lazy\" width=\"560\" height=\"314\" src=\"\/\/www.youtube.com\/embed\/7iX9nAJE0cE\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>Python\u3067\u306f<code>datetime<\/code>\u30e2\u30b8\u30e5\u30fc\u30eb\u3068time\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u3001\u7d4c\u904e\u6642\u9593\u3084\u65e5\u6642\u306e\u5dee\u5206\u3092\u7c21\u5358\u306b\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u5b9f\u7528\u7684\u306a\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3068\u3068\u3082\u306b\u8a73\u3057\u304f\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n<h2>\u57fa\u672c\u7684\u306a\u6642\u9593\u5dee\u306e\u8a08\u7b97<\/h2>\n<h3>datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u540c\u58eb\u306e\u5dee\u5206<\/h3>\n<pre><code class=\"language-python\">from datetime import datetime, timedelta\n\n# 2\u3064\u306e\u65e5\u6642\u3092\u8a2d\u5b9a\nstart = datetime(2024, 1, 15, 10, 30, 0)\nend = datetime(2024, 1, 15, 14, 45, 30)\n\n# \u6642\u9593\u5dee\u3092\u8a08\u7b97\ndiff = end - start\nprint(diff)                    # 4:15:30\nprint(type(diff))             # &lt;class 'datetime.timedelta'&gt;\nprint(f\"\u5dee\u5206: {diff.total_seconds()}\u79d2\")  # \u5dee\u5206: 15330.0\u79d2\n<\/code><\/pre>\n<h3>\u73fe\u5728\u6642\u523b\u3068\u306e\u5dee\u5206\u8a08\u7b97<\/h3>\n<pre><code class=\"language-python\">from datetime import datetime\n\n# \u904e\u53bb\u306e\u6642\u523b\u3092\u8a2d\u5b9a\npast_time = datetime(2024, 1, 1, 0, 0, 0)\nnow = datetime.now()\n\n# \u7d4c\u904e\u6642\u9593\u3092\u8a08\u7b97\nelapsed = now - past_time\nprint(f\"\u7d4c\u904e\u65e5\u6570: {elapsed.days}\u65e5\")\nprint(f\"\u7d4c\u904e\u6642\u9593: {elapsed.total_seconds()}\u79d2\")\n<\/code><\/pre>\n<h2>\u5b9f\u884c\u6642\u9593\u306e\u6e2c\u5b9a<\/h2>\n<h3>\u57fa\u672c\u7684\u306a\u5b9f\u884c\u6642\u9593\u6e2c\u5b9a<\/h3>\n<pre><code class=\"language-python\">import time\nfrom datetime import datetime\n\n# \u958b\u59cb\u6642\u523b\u3092\u8a18\u9332\nstart_time = datetime.now()\n\n# \u51e6\u7406\u3092\u5b9f\u884c\uff08\u4f8b\uff1a2\u79d2\u5f85\u6a5f\uff09\ntime.sleep(2.5)\n\n# \u7d42\u4e86\u6642\u523b\u3092\u8a18\u9332\u3057\u3066\u5dee\u5206\u8a08\u7b97\nend_time = datetime.now()\nexecution_time = end_time - start_time\n\nprint(f\"\u5b9f\u884c\u6642\u9593: {execution_time}\")\nprint(f\"\u5b9f\u884c\u6642\u9593\uff08\u79d2\uff09: {execution_time.total_seconds()}\")\n<\/code><\/pre>\n<h3>\u95a2\u6570\u306e\u5b9f\u884c\u6642\u9593\u3092\u6e2c\u5b9a\u3059\u308b\u30c7\u30b3\u30ec\u30fc\u30bf<\/h3>\n<pre><code class=\"language-python\">from datetime import datetime\nimport functools\n\ndef measure_time(func):\n    @functools.wraps(func)\n    def wrapper(*args, **kwargs):\n        start = datetime.now()\n        result = func(*args, **kwargs)\n        end = datetime.now()\n        elapsed = end - start\n        print(f\"{func.__name__}: {elapsed.total_seconds():.3f}\u79d2\")\n        return result\n    return wrapper\n\n@measure_time\ndef sample_function():\n    time.sleep(1)\n    return \"\u5b8c\u4e86\"\n\nresult = sample_function()  # sample_function: 1.001\u79d2\n<\/code><\/pre>\n<h2>timedelta\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u8a73\u7d30\u306a\u6271\u3044<\/h2>\n<h3>timedelta\u306e\u5404\u8981\u7d20\u306b\u30a2\u30af\u30bb\u30b9<\/h3>\n<pre><code class=\"language-python\">from datetime import datetime, timedelta\n\ndt1 = datetime(2024, 1, 1, 10, 30, 25)\ndt2 = datetime(2024, 1, 3, 14, 45, 50)\n\ndiff = dt2 - dt1\nprint(f\"\u65e5\u6570: {diff.days}\")                    # \u65e5\u6570: 2\nprint(f\"\u79d2\u6570: {diff.seconds}\")                 # \u79d2\u6570: 15325\nprint(f\"\u30de\u30a4\u30af\u30ed\u79d2: {diff.microseconds}\")      # \u30de\u30a4\u30af\u30ed\u79d2: 0\nprint(f\"\u7dcf\u79d2\u6570: {diff.total_seconds()}\")       # \u7dcf\u79d2\u6570: 188725.0\n<\/code><\/pre>\n<h3>\u6642\u9593\u5dee\u3092\u6642\u5206\u79d2\u3067\u8868\u793a<\/h3>\n<pre><code class=\"language-python\">def format_timedelta(td):\n    total_seconds = int(td.total_seconds())\n    days = total_seconds \/\/ 86400\n    hours = (total_seconds % 86400) \/\/ 3600\n    minutes = (total_seconds % 3600) \/\/ 60\n    seconds = total_seconds % 60\n    \n    return f\"{days}\u65e5 {hours}\u6642\u9593 {minutes}\u5206 {seconds}\u79d2\"\n\ndiff = datetime(2024, 1, 3, 14, 45, 30) - datetime(2024, 1, 1, 10, 30, 25)\nprint(format_timedelta(diff))  # 2\u65e5 4\u6642\u9593 15\u5206 5\u79d2\n<\/code><\/pre>\n<h2>\u9ad8\u7cbe\u5ea6\u306a\u6642\u9593\u6e2c\u5b9a<\/h2>\n<h3>time.perf_counter()\u3092\u4f7f\u7528<\/h3>\n<pre><code class=\"language-python\">import time\n\n# \u3088\u308a\u9ad8\u7cbe\u5ea6\u306a\u6642\u9593\u6e2c\u5b9a\nstart = time.perf_counter()\ntime.sleep(0.1)\nend = time.perf_counter()\n\nprint(f\"\u5b9f\u884c\u6642\u9593: {end - start:.6f}\u79d2\")\n<\/code><\/pre>\n<h3>\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3067\u6642\u9593\u6e2c\u5b9a<\/h3>\n<pre><code class=\"language-python\">import time\nfrom contextlib import contextmanager\n\n@contextmanager\ndef timer():\n    start = time.perf_counter()\n    yield\n    end = time.perf_counter()\n    print(f\"\u5b9f\u884c\u6642\u9593: {end - start:.3f}\u79d2\")\n\n# \u4f7f\u7528\u4f8b\nwith timer():\n    time.sleep(0.5)\n    # \u4f55\u3089\u304b\u306e\u51e6\u7406\n<\/code><\/pre>\n<h2>\u65e5\u4ed8\u9593\u306e\u5dee\u5206\u8a08\u7b97<\/h2>\n<h3>\u5e74\u9f62\u8a08\u7b97<\/h3>\n<pre><code class=\"language-python\">from datetime import date\n\ndef calculate_age(birth_date, reference_date=None):\n    if reference_date is None:\n        reference_date = date.today()\n    \n    age = reference_date.year - birth_date.year\n    if reference_date.month &lt; birth_date.month or \\\n       (reference_date.month == birth_date.month and reference_date.day &lt; birth_date.day):\n        age -= 1\n    \n    return age\n\nbirth = date(1990, 3, 15)\nage = calculate_age(birth)\nprint(f\"\u5e74\u9f62: {age}\u6b73\")\n<\/code><\/pre>\n<h3>\u55b6\u696d\u65e5\u306e\u8a08\u7b97\uff08\u571f\u65e5\u3092\u9664\u304f\uff09<\/h3>\n<pre><code class=\"language-python\">from datetime import datetime, timedelta\n\ndef count_business_days(start_date, end_date):\n    count = 0\n    current = start_date\n    \n    while current &lt;= end_date:\n        if current.weekday() &lt; 5:  # 0-6 (\u6708-\u65e5), 0-4\u304c\u5e73\u65e5\n            count += 1\n        current += timedelta(days=1)\n    \n    return count\n\nstart = datetime(2024, 1, 15)  # \u6708\u66dc\u65e5\nend = datetime(2024, 1, 21)    # \u65e5\u66dc\u65e5\n\nbusiness_days = count_business_days(start, end)\nprint(f\"\u55b6\u696d\u65e5\u6570: {business_days}\u65e5\")  # \u55b6\u696d\u65e5\u6570: 5\u65e5\n<\/code><\/pre>\n<h2>\u6642\u9593\u5dee\u306e\u6bd4\u8f03\u3068\u6761\u4ef6\u5206\u5c90<\/h2>\n<h3>\u6642\u9593\u5236\u9650\u306e\u5b9f\u88c5<\/h3>\n<pre><code class=\"language-python\">from datetime import datetime, timedelta\n\ndef is_within_time_limit(start_time, limit_minutes=30):\n    now = datetime.now()\n    elapsed = now - start_time\n    limit = timedelta(minutes=limit_minutes)\n    \n    return elapsed &lt;= limit\n\n# \u4f7f\u7528\u4f8b\ntask_start = datetime.now()\n# \u4f55\u3089\u304b\u306e\u51e6\u7406...\ntime.sleep(1)\n\nif is_within_time_limit(task_start, 60):\n    print(\"\u5236\u9650\u6642\u9593\u5185\u3067\u3059\")\nelse:\n    print(\"\u5236\u9650\u6642\u9593\u3092\u8d85\u3048\u307e\u3057\u305f\")\n<\/code><\/pre>\n<h3>\u6642\u9593\u5e2f\u306b\u3088\u308b\u51e6\u7406\u306e\u5206\u5c90<\/h3>\n<pre><code class=\"language-python\">from datetime import datetime, time\n\ndef get_time_period():\n    now_time = datetime.now().time()\n    \n    if time(6, 0) &lt;= now_time &lt; time(12, 0):\n        return \"\u5348\u524d\"\n    elif time(12, 0) &lt;= now_time &lt; time(18, 0):\n        return \"\u5348\u5f8c\"\n    else:\n        return \"\u591c\u9593\"\n\nperiod = get_time_period()\nprint(f\"\u73fe\u5728\u306e\u6642\u9593\u5e2f: {period}\")\n<\/code><\/pre>\n<h2>\u307e\u3068\u3081<\/h2>\n<ul>\n<li>datetime\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u540c\u58eb\u306e\u6f14\u7b97\u3067timedelta\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u5f97\u3089\u308c\u308b<\/li>\n<li><code>total_seconds()<\/code>\u3067\u7dcf\u79d2\u6570\u3092\u53d6\u5f97\u53ef\u80fd<\/li>\n<li><code>time.perf_counter()<\/code>\u3092\u4f7f\u7528\u3059\u308b\u3068\u9ad8\u7cbe\u5ea6\u306a\u6e2c\u5b9a\u304c\u53ef\u80fd<\/li>\n<li>\u5b9f\u7528\u7684\u306a\u6a5f\u80fd\u3068\u3057\u3066\u3001\u5e74\u9f62\u8a08\u7b97\u3084\u55b6\u696d\u65e5\u8a08\u7b97\u3082\u5b9f\u88c5\u3067\u304d\u308b<\/li>\n<li>\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3084\u30c7\u30b3\u30ec\u30fc\u30bf\u3092\u6d3b\u7528\u3059\u308b\u3068\u4fbf\u5229<\/li>\n<\/ul>\n<p>\u3053\u308c\u3089\u306e\u65b9\u6cd5\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001Python\u3067\u306e\u6642\u9593\u8a08\u7b97\u51e6\u7406\u304c\u52b9\u7387\u7684\u306b\u884c\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u25a0<a href=\"https:\/\/amzn.to\/3VxGkpx\">\u3089\u304f\u3089\u304fPython\u587e &#8211; \u8aad\u3080\u3060\u3051\u3067\u30de\u30b9\u30bf\u30fc<\/a><\/h2>\n\n\n\n<p><iframe loading=\"lazy\" width=\"560\" height=\"314\" src=\"\/\/www.youtube.com\/embed\/7iX9nAJE0cE\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n\n\n\n<p>\u25a0\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3051\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u30fb\u516c\u958b\u3057\u3066\u307f\u305f\uff01\uff01<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"nWM0I2zbzl\"><a href=\"https:\/\/techgym.jp\/column\/ori-app\/\">\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3051\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u30fb\u516c\u958b\u3057\u3066\u307f\u305f\uff01\uff01<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3051\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u30fb\u516c\u958b\u3057\u3066\u307f\u305f\uff01\uff01&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/column\/ori-app\/embed\/#?secret=rMqaI9inQj#?secret=nWM0I2zbzl\" data-secret=\"nWM0I2zbzl\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u25a0AI\u6642\u4ee3\u306e\u7b2c\u4e00\u6b69\uff01\u300cAI\u99c6\u52d5\u958b\u767a\u30b3\u30fc\u30b9\u300d\u306f\u3058\u3081\u307e\u3057\u305f\uff01<\/p>\n\n\n\n<p>\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821\u3067\u5148\u884c\u958b\u59cb\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"nKqeSZ8Afl\"><a href=\"https:\/\/techgym.jp\/about\/ai-driven-development\/\">AI\u99c6\u52d5\u958b\u767a\/\u751f\u6210AI\u30a8\u30f3\u30b8\u30cb\u30a2\u30b3\u30fc\u30b9\uff08\u521d\u5fc3\u8005\u5411\u3051\uff09<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;AI\u99c6\u52d5\u958b\u767a\/\u751f\u6210AI\u30a8\u30f3\u30b8\u30cb\u30a2\u30b3\u30fc\u30b9\uff08\u521d\u5fc3\u8005\u5411\u3051\uff09&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/about\/ai-driven-development\/embed\/#?secret=gS3VySn3Tu#?secret=nKqeSZ8Afl\" data-secret=\"nKqeSZ8Afl\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u25a0\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821<\/p>\n\n\n\n<p>\u300c\u6b66\u7530\u587e\u300d\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u7248\u3068\u3044\u3048\u3070\u300c\u30c6\u30c3\u30af\u30b8\u30e0\u300d\u3002<br>\u8b1b\u7fa9\u52d5\u753b\u306a\u3057\u3001\u6559\u79d1\u66f8\u306a\u3057\u3002\u300c\u9032\u6357\u7ba1\u7406\u3068\u30b3\u30fc\u30c1\u30f3\u30b0\u300d\u3067\u52b9\u7387\u5b66\u7fd2\u3002<br>\u3088\u308a\u65e9\u304f\u3001\u3088\u308a\u5b89\u304f\u3001\u3057\u304b\u3082\u5bfe\u9762\u578b\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"Tgs6ApC60r\"><a href=\"https:\/\/techgym.jp\/tokyo\/tokyo_honko\/\">\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/tokyo\/tokyo_honko\/embed\/#?secret=OnpiNh1nz2#?secret=Tgs6ApC60r\" data-secret=\"Tgs6ApC60r\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff1c\u77ed\u671f\u8b1b\u7fd2\uff1e5\u65e5\u30675\u4e07\u5186\u306e\u300cPython\u30df\u30cb\u30ad\u30e3\u30f3\u30d7\u300d\u958b\u50ac\u4e2d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"cisJA0ESn4\"><a href=\"https:\/\/techgym.jp\/event\/nagatacho_camp\/\">\u72ec\u5b66\u3082\u30aa\u30f3\u30e9\u30a4\u30f3\u3082\u7121\u7406\u3060\u304b\u3089\u3001\u6709\u7d66\u3068\u3063\u3066\u300cPython\u30df\u30cb\u30ad\u30e3\u30f3\u30d7\u300d\u3078\u30105\u65e5\u9593\u30675\u4e07\u5186\u3011<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u72ec\u5b66\u3082\u30aa\u30f3\u30e9\u30a4\u30f3\u3082\u7121\u7406\u3060\u304b\u3089\u3001\u6709\u7d66\u3068\u3063\u3066\u300cPython\u30df\u30cb\u30ad\u30e3\u30f3\u30d7\u300d\u3078\u30105\u65e5\u9593\u30675\u4e07\u5186\u3011&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/event\/nagatacho_camp\/embed\/#?secret=gTYsDxVNJj#?secret=cisJA0ESn4\" data-secret=\"cisJA0ESn4\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff1c\u67081\u958b\u50ac\uff1e\u653e\u9001\u4f5c\u5bb6\u306b\u3088\u308b\u6620\u50cf\u30c7\u30a3\u30ec\u30af\u30bf\u30fc\u990a\u6210\u8b1b\u5ea7<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"fTIxmsY6zG\"><a href=\"https:\/\/techgym.jp\/event\/video_director\/\">\u73fe\u5f79\u653e\u9001\u4f5c\u5bb6\u304c\u6559\u3048\u308b\u52d5\u753b\u8b1b\u5ea7\uff01\u300e\uff24\uff2f\uff27\uff21\u300f<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u73fe\u5f79\u653e\u9001\u4f5c\u5bb6\u304c\u6559\u3048\u308b\u52d5\u753b\u8b1b\u5ea7\uff01\u300e\uff24\uff2f\uff27\uff21\u300f&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/event\/video_director\/embed\/#?secret=SyEU8Yk7fU#?secret=fTIxmsY6zG\" data-secret=\"fTIxmsY6zG\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff1c\u30aa\u30f3\u30e9\u30a4\u30f3\u7121\u6599\uff1e\u30bc\u30ed\u304b\u3089\u59cb\u3081\u308bPython\u7206\u901f\u8b1b\u5ea7<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"q8IpLlu0Cz\"><a href=\"https:\/\/techgym.jp\/tokyo_python\/\">\u30bc\u30ed\u304b\u3089\u59cb\u3081\u308bPython\u7206\u901f\u8b1b\u5ea7\uff08\u7406\u7cfb\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u521d\u5fc3\u8005\u5411\u3051\uff09<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u30bc\u30ed\u304b\u3089\u59cb\u3081\u308bPython\u7206\u901f\u8b1b\u5ea7\uff08\u7406\u7cfb\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u521d\u5fc3\u8005\u5411\u3051\uff09&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/tokyo_python\/embed\/#?secret=3saVA1WxAg#?secret=q8IpLlu0Cz\" data-secret=\"q8IpLlu0Cz\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Python\u3067\u306fdatetime\u30e2\u30b8\u30e5\u30fc\u30eb\u3068time\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u3001\u7d4c\u904e\u6642\u9593\u3084\u65e5\u6642\u306e\u5dee\u5206\u3092\u7c21\u5358\u306b\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u5b9f\u7528\u7684\u306a\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3068\u3068\u3082\u306b\u8a73\u3057\u304f\u89e3\u8aac\u3057\u307e\u3059\u3002 \u57fa\u672c\u7684\u306a\u6642\u9593\u5dee\u306e\u8a08\u7b97 datetime\u30aa [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":42501,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-44166","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-column"],"views":82,"jetpack_featured_media_url":"\/wp-content\/uploads\/2025\/07\/f3403acf5c65aedec0dba821c4c26404.png","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/posts\/44166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/comments?post=44166"}],"version-history":[{"count":0,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/posts\/44166\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/media\/42501"}],"wp:attachment":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/media?parent=44166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/categories?post=44166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/tags?post=44166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}