{"id":895,"date":"2023-10-05T18:37:38","date_gmt":"2023-10-05T18:37:38","guid":{"rendered":"https:\/\/iotmanager.org\/?p=895"},"modified":"2023-10-05T18:37:38","modified_gmt":"2023-10-05T18:37:38","slug":"%d0%ba%d0%b0%d0%ba-%d1%84%d0%be%d1%80%d0%bc%d0%b0%d1%82%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d1%82%d1%8c-%d1%81%d1%82%d1%80%d0%be%d0%ba%d1%83-%d0%b2%d1%80%d0%b5%d0%bc%d0%b5%d0%bd%d0%b8","status":"publish","type":"post","link":"https:\/\/iotmanager.org\/en\/2023\/10\/05\/895\/","title":{"rendered":"How to format a time string"},"content":{"rendered":"<p>Output example:<\/p>\n\n\n\n<p>&#171;defFormat&#187;: &#171;d-m-Y&#187;, \u0432\u044b\u0432\u043e\u0434 \u0434\u0435\u043d\u044c-\u043c\u0435\u0441\u044f\u0446-\u0433\u043e\u0434.<br>\u0421\u0422\u0420\u041e\u041a\u0410_\u0428\u0410\u0411\u041b\u041e\u041d &#8212; \u0437\u0430\u0434\u0430\u0451\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043a\u0430\u043a \u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 date() \u0432 PHP:<\/p>\n\n\n\n<p>s &#8212; \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043e\u0442 00 \u0434\u043e 59 (\u0434\u0432\u0430 \u0437\u043d\u0430\u043a\u0430)<br>i &#8212; \u043c\u0438\u043d\u0443\u0442\u044b \u043e\u0442 00 \u0434\u043e 59 (\u0434\u0432\u0430 \u0437\u043d\u0430\u043a\u0430)<br>h &#8212; \u0447\u0430\u0441\u044b \u0432 12-\u0447\u0430\u0441\u043e\u0432\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043e\u0442 01 \u0434\u043e 12 (\u0434\u0432\u0430 \u0437\u043d\u0430\u043a\u0430)<br>H &#8212; \u0447\u0430\u0441\u044b \u0432 24-\u0447\u0430\u0441\u043e\u0432\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043e\u0442 00 \u0434\u043e 23 (\u0434\u0432\u0430 \u0437\u043d\u0430\u043a\u0430)<br>d &#8212; \u0434\u0435\u043d\u044c \u043c\u0435\u0441\u044f\u0446\u0430 \u043e\u0442 01 \u0434\u043e 31 (\u0434\u0432\u0430 \u0437\u043d\u0430\u043a\u0430)<br>w &#8212; \u0434\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438 \u043e\u0442 0 \u0434\u043e 6 (\u043e\u0434\u0438\u043d \u0437\u043d\u0430\u043a: 0-\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435, 6-\u0441\u0443\u0431\u0431\u043e\u0442\u0430)<br>D &#8212; \u0434\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 Mon \u0434\u043e Sun (\u0442\u0440\u0438 \u0437\u043d\u0430\u043a\u0430: Mon Tue Wed Thu Fri Sat Sun)<br>m &#8212; \u043c\u0435\u0441\u044f\u0446 \u043e\u0442 01 \u0434\u043e 12 (\u0434\u0432\u0430 \u0437\u043d\u0430\u043a\u0430)<br>M &#8212; \u043c\u0435\u0441\u044f\u0446 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 Jan \u0434\u043e Dec (\u0442\u0440\u0438 \u0437\u043d\u0430\u043a\u0430: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)<br>Y &#8212; \u0433\u043e\u0434 \u043e\u0442 2000 \u0434\u043e 2099 (\u0447\u0435\u0442\u044b\u0440\u0435 \u0437\u043d\u0430\u043a\u0430)<br>y &#8212; \u0433\u043e\u0434 \u043e\u0442 00 \u0434\u043e 99 (\u0434\u0432\u0430 \u0437\u043d\u0430\u043a\u0430)<br>a &#8212; \u043f\u043e\u043b\u0434\u0435\u043d\u044c am \u0438\u043b\u0438 pm (\u0434\u0432\u0430 \u0437\u043d\u0430\u043a\u0430, \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435)<br>A &#8212; \u043f\u043e\u043b\u0434\u0435\u043d\u044c AM \u0438\u043b\u0438 PM (\u0434\u0432\u0430 \u0437\u043d\u0430\u043a\u0430, \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435)<\/p>","protected":false},"excerpt":{"rendered":"<p>Example output: &#034;defFormat&#034;: &#034;d-m-Y&#034;, output day-month-year.STRING_MASK-sets a template for displaying a time string, like the date() function in PHP: s-seconds from 00 to 59 (two digits) i-minutes from 00 to 59 (two digits) h \u2014 hours in 12-hour format from 01 to 12 (two digits)H \u2014 hours in 24-hour format from 00 to \u2026 <a title=\"How to format a time string\" class=\"read-more\" href=\"https:\/\/iotmanager.org\/en\/2023\/10\/05\/895\/\" aria-label=\"More on \u041a\u0430\u043a \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438\">Read more<\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[77],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/posts\/895"}],"collection":[{"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/comments?post=895"}],"version-history":[{"count":1,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/posts\/895\/revisions"}],"predecessor-version":[{"id":896,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/posts\/895\/revisions\/896"}],"wp:attachment":[{"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/media?parent=895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/categories?post=895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iotmanager.org\/en\/wp-json\/wp\/v2\/tags?post=895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}