{"id":28531142,"url":"https://github.com/aneeshikmat/timedowncounter","last_synced_at":"2025-07-27T15:16:32.012Z","repository":{"id":56948242,"uuid":"114418691","full_name":"aneeshikmat/timeDownCounter","owner":"aneeshikmat","description":"JS countdown timer with options to styling and print timer in short time ","archived":false,"fork":false,"pushed_at":"2018-08-13T10:19:52.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-07T12:42:50.986Z","etag":null,"topics":["countdown-timer","counter","javascript","javascript-countdown","js","timer-html"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aneeshikmat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-15T23:15:32.000Z","updated_at":"2023-09-10T05:33:35.000Z","dependencies_parsed_at":"2022-08-21T03:10:17.680Z","dependency_job_id":null,"html_url":"https://github.com/aneeshikmat/timeDownCounter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aneeshikmat/timeDownCounter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneeshikmat%2FtimeDownCounter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneeshikmat%2FtimeDownCounter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneeshikmat%2FtimeDownCounter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneeshikmat%2FtimeDownCounter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aneeshikmat","download_url":"https://codeload.github.com/aneeshikmat/timeDownCounter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneeshikmat%2FtimeDownCounter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267376574,"owners_count":24077359,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["countdown-timer","counter","javascript","javascript-countdown","js","timer-html"],"created_at":"2025-06-09T15:09:26.542Z","updated_at":"2025-07-27T15:16:31.959Z","avatar_url":"https://github.com/aneeshikmat.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# timeDownCounter\nJS countdown timer with options to styling and print timer in short time \n\n## Screenshot from normal result\n\n![Yii2 timeDownCounter screenshot_t1](http://2nees.com/github/timeDownCounter/temp-0.png)\n\n## Screenshot for templete 1\n\n![Yii2 timeDownCounter screenshot_temp1](http://2nees.com/github/timeDownCounter/temp-1.png)\n\n## Screenshot for templete 2\n\n![Yii2 timeDownCounter screenshot_temo2](http://2nees.com/github/timeDownCounter/temp-2.png)\n\nAnd you can custmize you'r template as yourr like, we give you an option to build and control your design or use our simple design and change color, distance ...etc as you like.\n\n## Features\n\n1. Countdown timer work with days, houres, minutes and seconds\n2. Appilty to get timer html with fully html item container, or semi or none.(in other word you will get result dirctly or with html wrappring).\n3. Countdown timer can be stop to custmize styling or to get template to init it as default value.\n4. You have an option to determine the sperator for timer.\n5. You can handling time over message.\n6. You have an option to determind if timer will display d-h-m-s or h-m-s or m-s.\n7. its an javascript functon and you dont need to include any other js/css lib.\n\n## Decencies\n\nNothing.\n\n## Installation:\nThe preferred way to install this extension is through [composer](https://getcomposer.org/).\n\nEither run\n\n`php composer.phar require --prefer-dist aneeshikmat/time-down-counter \"*@dev\"`\n\nor you can install function with examples from:\nhttp://2nees.com/timeDownCounter\n\n## Usage\nTo use this function you need to add this code to your html: \n```\n\u003cbody\u003e\n............\n\u003cdiv id=\"time-down-counter\"\u003e\u003c/div\u003e\n\u003cscript type=\"text/javascript\" src=\"timeDownCounter.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    // Run Default Counter option\n    timeDownCounter({\n        //options\n    }).startCountDown();\n\u003c/script\u003e\n\u003c/body\u003e\n\n```\nAs you see, its very simple, and now we will be explaning this code, and then go to display all option may be use to help us,\nIn prev code we call timeDownCounter function, **startCountDown()** is used to start count down timer.(if you write this syntax dirctly without determind any option, you will git time over message).\n\nNow let's go to explain all possible option:\n\n```\ntimeDownCounter({\n                'countDownIdSelector': 'time-down-counter',\n                'countDownDate':  new Date(\"Sep 5, 2018 15:37:25\").getTime(),\n                'countDownResSperator': '-'\n                'countDownReturnData': 'from-hours',\n                'addSpanForResult': true,\n                'addSpanForEachNum': true,\n                'contDownOver': 'Time is expired, and you can say hello now :P',\n                'getTemplateResult': 0\n            }).startCountDown();\n```\n1) countDownIdSelector: This option give you apilty to change default timer wrapper, its usfall if you have more than one timer in the same html page, default selctor value is 'time-down-counter', and this selector must be an ID.\n\n2) countDownDate: This option will accept count down date in millisecond, if you keep it empty the default value will be current time so that the count down over message will be print.\nNote: if you using **PHP** you can use strtotime('....') * 1000 like **strtotime(\"+1 day\") * 1000;**.\n\n3) countDownResSperator: This option give you apilty to change time Sperator, default sperator is **:** nested in \u003cspan\u003e tag.\n    \n4) countDownReturnData: This option give you apilty to display full timer result (days, hours, minutes, seconds), or (hours, minutes, seconds) or (minutes, seconds), and accpet options is ('from-days' is default, 'from-hours', 'from-minutes').\nNote: This option will kep timer work nomraly without removed any value, just hide / show option.\n\n5) addSpanForResult: This option give you apilty to set each number groub in \u003cspan\u003e tag contain general class called **item-counter-down**.\n    \n6) addSpanForEachNum: This option give you apilty to set each number in timer in \u003cspan\u003e tag contain general class called **inner-item-counter-down**. \n    \n## screenshot for html result for point 5 and 6: \n\n![Yii2 timeDownCounter screenshot_temo2](http://2nees.com/github/timeDownCounter/temp-3.png)\n\n7) countDownOver: This option give you apilty to update message for count down over (when timer is finshed).\n\n8) getTemplateResult: This option give you apilty to stop count down timer, the default value is **0** and thats mean timer work, **1** is mean stop timer and display timer result, **2** is mean stop timer and display html timer result.\nThese option give you abilty to design / styling timer on browser dirctly, since the timer is work depednace of Interval function, and second option is usfall when you need to get result to set default value in html, since js need some time to start timing.\n\nexample if we use **getTemplateResult: 2** :\n```\n\u003cdiv id=\"time-down-counter\"\u003e30\u003cspan class=\"timeDownSperator\"\u003e:\u003c/span\u003e23\u003cspan class=\"timeDownSperator\"\u003e:\u003c/span\u003e59\u003cspan class=\"timeDownSperator\"\u003e:\u003c/span\u003e58\u003c/div\u003e\n```\n\n## Callback function\n\n```\n\n// Run Counter with callback funtion, callback function will be come after options object like [ timeDownCounter({}, callback()) ]\ntimeDownCounter({\n    'countDownIdSelector': 'time-down-counter-5',// Set id for counter, default one is time-down-counter\n}, function(){\n    document.getElementById('time-down-counter-5').innerHTML = 'time-down-counter-5 is called callback function';\n}).startCountDown();\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneeshikmat%2Ftimedowncounter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faneeshikmat%2Ftimedowncounter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneeshikmat%2Ftimedowncounter/lists"}