{"id":1016,"date":"2024-12-17T04:36:00","date_gmt":"2024-12-17T04:36:00","guid":{"rendered":"https:\/\/monkey.ploogie.co.uk\/?page_id=1016"},"modified":"2024-12-17T04:46:56","modified_gmt":"2024-12-17T04:46:56","slug":"mwnci-sec2time-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-sec2time-function\/","title":{"rendered":"Mwnci sec2time() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>sec2time<strong>(<em>integer<\/em>)<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>sec2time()<\/i> function converts the amount of seconds given into Days, Hours, Minutes, Seconds of elapsed time, and returns the data as a hash.<\/p>\n<h2>Example<\/h2>\n<pre>\r\n\/\/ The amount of time since 00:00 Jan 1st 1970\r\nprintln(sec2time(time()))\r\n\r\n\/\/ Should be a bit or so after 24 hours\r\nprintln(sec2time(86972))\r\n\r\n\r\n{\"Min\": 43, \"Sec\": 57, \"Day\": 20074, \"Hour\": 4}\r\n{\"Hour\": 0, \"Min\": 9, \"Sec\": 32, \"Day\": 1}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax sec2time(integer) Description The sec2time() function converts the amount of seconds given into Days, Hours, Minutes, Seconds of elapsed time, and returns the data as a hash. Example \/\/ The amount of time since 00:00 Jan 1st 1970 println(sec2time(time())) \/\/ Should be a bit or so after 24 hours println(sec2time(86972)) {&#8220;Min&#8221;: 43, &#8220;Sec&#8221;: 57, &#8220;Day&#8221;: &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-sec2time-function\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mwnci sec2time() Function&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1016","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=1016"}],"version-history":[{"count":2,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1016\/revisions"}],"predecessor-version":[{"id":1020,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/1016\/revisions\/1020"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}