{"id":2405,"date":"2024-08-29T15:36:09","date_gmt":"2024-08-29T14:36:09","guid":{"rendered":"https:\/\/codeflarelimited.com\/blog\/?p=2405"},"modified":"2024-09-02T11:09:05","modified_gmt":"2024-09-02T10:09:05","slug":"php-datetime-class","status":"publish","type":"post","link":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/","title":{"rendered":"Working with PHP&#8217;s DateTime Class"},"content":{"rendered":"\n<p>PHP&#8217;s DateTime class offers a powerful and flexible way to manage dates and times in your applications. Whether you need to format dates, perform calculations, or handle different time zones, the PHP DateTime class simplifies these tasks. In this article, we&#8217;ll explore the key functionalities of the PHP DateTime class and how you can use it to effectively manage date and time in your PHP projects.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Creating DateTime Objects<\/strong><\/h3>\n\n\n\n<p>To start working with dates and times in PHP, you first need to create a <code>DateTime<\/code> object. You can initialize a <code>DateTime<\/code> object with the current date and time or specify a particular date and time.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/\/ Create a DateTime object for the current date and time\n$now = new DateTime();\n\n\/\/ Create a DateTime object for a specific date and time\n$specificDate = new DateTime('2024-08-29 14:00:00');\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Formatting Dates and Times<\/h4>\n\n\n\n<p>The <code>DateTime<\/code> class allows you to format dates and times in various ways using the <code>format<\/code> method. This method accepts a format string that defines how the date and time should be displayed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/\/ Format the date and time\necho $now-&gt;format('Y-m-d H:i:s'); \/\/ Output: 2024-08-29 14:00:00\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Modifying Dates and Times<\/h4>\n\n\n\n<p>You can modify <code>DateTime<\/code> objects by using the <code>modify<\/code> method or <code>add<\/code> and <code>sub<\/code> methods. This is useful for tasks such as adding days or subtracting hours.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/\/ Add 10 days to the current date\n$now-&gt;modify('+10 days');\necho $now-&gt;format('Y-m-d'); \/\/ Output: 2024-09-08\n\n\/\/ Subtract 2 months from the current date\n$now-&gt;sub(new DateInterval('P2M'));\necho $now-&gt;format('Y-m-d'); \/\/ Output: 2024-07-08\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Handling Time Zones<\/h4>\n\n\n\n<p>The <code>DateTime<\/code> class also provides the ability to work with different time zones. You can set the time zone when creating a <code>DateTime<\/code> object or change it later using the <code>setTimezone<\/code> method.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/\/ Create a DateTime object with a specific time zone\n$timeZone = new DateTimeZone('America\/New_York');\n$nyTime = new DateTime('now', $timeZone);\necho $nyTime-&gt;format('Y-m-d H:i:s T'); \/\/ Output: 2024-08-29 10:00:00 EDT\n\n\/\/ Change the time zone of an existing DateTime object\n$timeZoneLondon = new DateTimeZone('Europe\/London');\n$nyTime-&gt;setTimezone($timeZoneLondon);\necho $nyTime-&gt;format('Y-m-d H:i:s T'); \/\/ Output: 2024-08-29 15:00:00 BST\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">DateTime Intervals<\/h4>\n\n\n\n<p>PHP\u2019s <code>DateInterval<\/code> class allows you to represent a time interval and use it to add or subtract time from a <code>DateTime<\/code> object. This is useful for tasks such as calculating differences between dates.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/\/ Create a DateInterval representing 1 year\n$interval = new DateInterval('P1Y');\n\n\/\/ Add 1 year to the current date\n$now-&gt;add($interval);\necho $now-&gt;format('Y-m-d'); \/\/ Output: 2025-07-08\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Comparing Dates<\/h4>\n\n\n\n<p>To compare two <code>DateTime<\/code> objects, you can use comparison operators or the <code>diff<\/code> method to get the difference between them.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">\/\/ Create two DateTime objects\n$date1 = new DateTime('2024-08-29');\n$date\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">$date2 = new DateTime('2024-09-01');\n\n\/\/ Compare two dates\nif ($date1 &lt; $date2) {\n    echo \"Date1 is earlier than Date2\";\n}\n\n\/\/ Calculate the difference between two dates\n$diff = $date1-&gt;diff($date2);\necho $diff-&gt;format('%R%a days'); \/\/ Output: +3 days\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h3>\n\n\n\n<p>The <code>DateTime<\/code> class in PHP provides a comprehensive set of tools for managing date and time. From creating and formatting dates to handling time zones and intervals, this class offers everything you need for effective date and time manipulation. By leveraging its features, you can handle complex date and time requirements in your PHP applications with ease.<\/p>\n\n\n\n<p><a href=\"https:\/\/codeflarelimited.com\/blog\/javascript-es6-modules-import-and-export\/\">JavaScript Modules: ES6 Import and Export<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP&#8217;s DateTime class offers a powerful and flexible way to manage dates and times in your applications. Whether<\/p>\n","protected":false},"author":3,"featured_media":2410,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[87],"tags":[99],"class_list":["post-2405","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-software-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PHP DateTime class<\/title>\n<meta name=\"description\" content=\"Learn how to effectively manage dates and times in PHP using the powerful PHP DateTime class, simplifying complex date manipulations...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP DateTime class\" \/>\n<meta property=\"og:description\" content=\"Learn how to effectively manage dates and times in PHP using the powerful PHP DateTime class, simplifying complex date manipulations...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-08-29T14:36:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-02T10:09:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240829-WA0013.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1080\" \/>\n\t<meta property=\"og:image:height\" content=\"607\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kene Samuel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php-datetime-class\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php-datetime-class\\\/\"},\"author\":{\"name\":\"Kene Samuel\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/c501609bab46c16807eb32106074f206\"},\"headline\":\"Working with PHP&#8217;s DateTime Class\",\"datePublished\":\"2024-08-29T14:36:09+00:00\",\"dateModified\":\"2024-09-02T10:09:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php-datetime-class\\\/\"},\"wordCount\":319,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php-datetime-class\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/IMG-20240829-WA0013.jpg\",\"keywords\":[\"software development\"],\"articleSection\":[\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php-datetime-class\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php-datetime-class\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php-datetime-class\\\/\",\"name\":\"PHP DateTime class\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php-datetime-class\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php-datetime-class\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/IMG-20240829-WA0013.jpg\",\"datePublished\":\"2024-08-29T14:36:09+00:00\",\"dateModified\":\"2024-09-02T10:09:05+00:00\",\"description\":\"Learn how to effectively manage dates and times in PHP using the powerful PHP DateTime class, simplifying complex date manipulations...\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php-datetime-class\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php-datetime-class\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php-datetime-class\\\/#primaryimage\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/IMG-20240829-WA0013.jpg\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/IMG-20240829-WA0013.jpg\",\"width\":1080,\"height\":607},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php-datetime-class\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"php\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/php\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Working with PHP&#8217;s DateTime Class\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"name\":\"\",\"description\":\"Sustainable solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\",\"name\":\"Codeflare Limited\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"width\":1040,\"height\":263,\"caption\":\"Codeflare Limited\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/c501609bab46c16807eb32106074f206\",\"name\":\"Kene Samuel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"caption\":\"Kene Samuel\"},\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/author\\\/kene\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP DateTime class","description":"Learn how to effectively manage dates and times in PHP using the powerful PHP DateTime class, simplifying complex date manipulations...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/","og_locale":"en_US","og_type":"article","og_title":"PHP DateTime class","og_description":"Learn how to effectively manage dates and times in PHP using the powerful PHP DateTime class, simplifying complex date manipulations...","og_url":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/","article_published_time":"2024-08-29T14:36:09+00:00","article_modified_time":"2024-09-02T10:09:05+00:00","og_image":[{"width":1080,"height":607,"url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240829-WA0013.jpg","type":"image\/jpeg"}],"author":"Kene Samuel","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/#article","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/"},"author":{"name":"Kene Samuel","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/c501609bab46c16807eb32106074f206"},"headline":"Working with PHP&#8217;s DateTime Class","datePublished":"2024-08-29T14:36:09+00:00","dateModified":"2024-09-02T10:09:05+00:00","mainEntityOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/"},"wordCount":319,"commentCount":0,"publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240829-WA0013.jpg","keywords":["software development"],"articleSection":["php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/","url":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/","name":"PHP DateTime class","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/#primaryimage"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240829-WA0013.jpg","datePublished":"2024-08-29T14:36:09+00:00","dateModified":"2024-09-02T10:09:05+00:00","description":"Learn how to effectively manage dates and times in PHP using the powerful PHP DateTime class, simplifying complex date manipulations...","breadcrumb":{"@id":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/#primaryimage","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240829-WA0013.jpg","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240829-WA0013.jpg","width":1080,"height":607},{"@type":"BreadcrumbList","@id":"https:\/\/codeflarelimited.com\/blog\/php-datetime-class\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codeflarelimited.com\/blog\/"},{"@type":"ListItem","position":2,"name":"php","item":"https:\/\/codeflarelimited.com\/blog\/php\/"},{"@type":"ListItem","position":3,"name":"Working with PHP&#8217;s DateTime Class"}]},{"@type":"WebSite","@id":"https:\/\/codeflarelimited.com\/blog\/#website","url":"https:\/\/codeflarelimited.com\/blog\/","name":"","description":"Sustainable solutions","publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codeflarelimited.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codeflarelimited.com\/blog\/#organization","name":"Codeflare Limited","url":"https:\/\/codeflarelimited.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","width":1040,"height":263,"caption":"Codeflare Limited"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/c501609bab46c16807eb32106074f206","name":"Kene Samuel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","caption":"Kene Samuel"},"url":"https:\/\/codeflarelimited.com\/blog\/author\/kene\/"}]}},"jetpack_featured_media_url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240829-WA0013.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/comments?post=2405"}],"version-history":[{"count":1,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2405\/revisions"}],"predecessor-version":[{"id":2406,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2405\/revisions\/2406"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media\/2410"}],"wp:attachment":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media?parent=2405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/categories?post=2405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/tags?post=2405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}