{"id":20972486,"url":"https://github.com/nikolvs/sparkar-dateformat","last_synced_at":"2025-09-17T20:38:49.788Z","repository":{"id":82587860,"uuid":"343004801","full_name":"nikolvs/sparkar-dateformat","owner":"nikolvs","description":"Patch script for date formatting for Spark AR Studio.","archived":false,"fork":false,"pushed_at":"2021-07-27T14:07:45.000Z","size":94,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T11:41:35.530Z","etag":null,"topics":["date","dateformat","datetime","spark-ar","sparkar","sparkar-patch","time"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikolvs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-02-28T02:35:33.000Z","updated_at":"2024-02-12T22:54:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"3e68e378-020e-4366-ab73-1996043db98d","html_url":"https://github.com/nikolvs/sparkar-dateformat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nikolvs/sparkar-dateformat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolvs%2Fsparkar-dateformat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolvs%2Fsparkar-dateformat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolvs%2Fsparkar-dateformat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolvs%2Fsparkar-dateformat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikolvs","download_url":"https://codeload.github.com/nikolvs/sparkar-dateformat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolvs%2Fsparkar-dateformat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275658802,"owners_count":25504780,"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-09-17T02:00:09.119Z","response_time":84,"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":["date","dateformat","datetime","spark-ar","sparkar","sparkar-patch","time"],"created_at":"2024-11-19T04:08:31.820Z","updated_at":"2025-09-17T20:38:49.775Z","avatar_url":"https://github.com/nikolvs.png","language":"JavaScript","readme":"# sparkar-dateformat\n\u003e Patch script for date formatting for Spark AR Studio.\n\n![Screenshot](./screenshot.jpg)\n\n## Install\n[Click here](https://github.com/nikolvs/sparkar-dateformat/archive/main.zip) to download the zip file, extract it and import `dateformat.js` as an asset for your Spark AR project.\n\n## Usage\nBelow are the patch inputs/outputs you have to define for the script.\n\n### From Script\n\n#### `date`\n* **Description**: Formatted date you receive from the script.\n* **Type**: Text\n\n### To Script\n\n#### `format`\n* **Description**: Set in which format pattern the date text will be generated.\n* **Type**: Text\n* **Optional**: `true`\n* **Default**: `'YYYY-MM-DD HH:mm:ss'`\n\n**Patterns**\n| Input | Example | Description\n| --- | --- | ---\n| `YYYY` | `2021` | 4 digit year.\n| `YY` | `21` | 2 digit year.\n| `MM` | `02` | Month number from 01 to 12 (with leading zero).\n| `M` | `2` | Month number from 1 to 12.\n| `DD` | `09` | Day of month from 01 to 31 (with leading zero).\n| `D` | `9` | Day of month from 1 to 31.\n| `HH` | `06` | Hours (24 hour time) from 00 to 23 (with leading zero).\n| `H` | `6` | Hours (24 hour time) from 0 to 23.\n| `hh` | `03` | Hours (12 hour time) from 01 to 12 (with leading zero).\n| `h` | `3` | Hours (12 hour time) from 1 to 12.\n| `mm` | `04` | Minutes from 00 to 59 (with leading zero).\n| `m` | `4` | Minutes from 0 to 59.\n| `ss` | `07` | Seconds from 00 to 59 (with leading zero).\n| `s` | `7` | Seconds from 0 to 59.\n| `A` | `PM` | Post or ante meridiem in uppercase.\n| `a` | `am` | Post or ante meridiem in lowercase.\n\n#### `refreshInterval`\n* **Description**: Interval in seconds in which the date text will be refreshed. \n* **Type**: Number\n* **Optional**: `true`\n* **Default**: `1`\n\n#### `debug`\n* **Description**: Display debug messages on console. \n* **Type**: Boolean\n* **Optional**: `true`\n* **Default**: `false`\n\n## Credits\n* [Josh Beckwith](https://github.com/positlabs) for making [spark-localtime](https://github.com/positlabs/spark-localtime), which inspired me to create this script. I originally planned to contribute to his repo, but since his script relied on the `toLocaleDateString` method and it doesn't seen to work on Spark AR Studio anymore, I just made my own script from scratch;\n* [Taynara Lima](https://www.instagram.com/taynaragpyk/) for creating Instagram filters, which made me see the limitations of Spark AR Studio in relation to date formats and inspired me to help her.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolvs%2Fsparkar-dateformat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikolvs%2Fsparkar-dateformat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolvs%2Fsparkar-dateformat/lists"}