{"id":20522632,"url":"https://github.com/ocalasans/Gettime-Functions","last_synced_at":"2025-09-25T12:30:37.089Z","repository":{"id":184313575,"uuid":"671670712","full_name":"ocalasans/Gettime-Funcoes","owner":"ocalasans","description":"Include GettimeFuncoes para SA:MP (San Andreas Multiplayer)","archived":false,"fork":false,"pushed_at":"2024-02-10T07:00:58.000Z","size":56,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-15T22:36:11.779Z","etag":null,"topics":["gta","include","pawn","pawno","sa-mp","samp"],"latest_commit_sha":null,"homepage":"https://abre.ai/samp-spc","language":"Pawn","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ocalasans.png","metadata":{"files":{"readme":"README.eng.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-27T21:37:13.000Z","updated_at":"2024-04-28T22:31:54.000Z","dependencies_parsed_at":"2024-01-29T04:22:01.396Z","dependency_job_id":"b1ad2acc-90f3-4a63-86fc-31ff540a95ce","html_url":"https://github.com/ocalasans/Gettime-Funcoes","commit_stats":null,"previous_names":["walkerxinho7/abreviacao-gettime-getdate","walkerxinho7/gettime-funcoes","ocalasans/gettime-funcoes"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocalasans%2FGettime-Funcoes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocalasans%2FGettime-Funcoes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocalasans%2FGettime-Funcoes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocalasans%2FGettime-Funcoes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocalasans","download_url":"https://codeload.github.com/ocalasans/Gettime-Funcoes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234187101,"owners_count":18793133,"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","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":["gta","include","pawn","pawno","sa-mp","samp"],"created_at":"2024-11-15T22:36:14.560Z","updated_at":"2025-09-25T12:30:36.760Z","avatar_url":"https://github.com/ocalasans.png","language":"Pawn","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Include GettimeFuncoes SA:MP\r\n\r\nThis is an include that contains a function to abbreviate `gettime` and `getdate`. Read the categories below to stay informed.\r\n\r\n-----------------------\r\n \r\n\r\n### How to install?\r\n\r\nYou should download the include. After doing so, you need to place the include in the folder (pawno \u003e include). Once you have done that, open the pwn file of your Gamemode and insert the following code below your other includes:\r\n```pawn\r\n#include \u003cGettimeFuncoes\u003e\r\n```\r\n\r\n-----------------------\r\n\r\n### What is the difference?\r\n\r\nHere are two commands, and you can see the difference by whether or not I include them.\r\n\r\nCommand without the include:\r\n```pawn\r\nCMD:dateandtime(playerid)\r\n{\r\n    new string[100], day, month, year, hour, minute, second;\r\n    //\r\n    getdate(year, month, day);\r\n    gettime(hour, minute, second);\r\n    //\r\n    format(string, sizeof string, \"Date and Time: %02d/%02d/%04d the %02d:%02d:%02d.\", month, day, year, hour, minute, second);\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\nCommand with the include:\r\n```pawn\r\nCMD:dateandtime(playerid)\r\n{\r\n    new string[100];\r\n    //\r\n    format(string, sizeof string, \"Date and Time: %s.\", Gettime_Function(DATE_AND_TIME));\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\n-----------------------\r\n\r\n### How does it work?\r\n\r\nThere is no secret to using the `Gettime_Function`. The format will depend on each definition provided below, and each definition will include an example for better understanding.\r\n\r\n\u003e [!NOTE]\r\n\u003e `DATE_AND_TIME` //0\r\n\u003e\r\n\u003e `ONLY_THE_DATE` //1\r\n\u003e\r\n\u003e `JUST_THE_TIME` //2\r\n\u003e\r\n\u003e `DATE_WHITOUT_SECONDS` //3\r\n\u003e\r\n\u003e `DATE_WHITOUT_YEAR` //4\r\n\u003e\r\n\u003e `TIME_WITHOUT_SECONDS` //5\r\n\u003e\r\n\u003e `JUST_THE_YEAR` //6\r\n\u003e\r\n\u003e `JUST_THE_MONTH` //7\r\n\u003e\r\n\u003e `JUST_THE_DAY` //8\r\n\u003e\r\n\u003e `JUST_THE_HOUR` //9\r\n\u003e\r\n\u003e `JUST_THE_MINUTE` //10\r\n\u003e\r\n\u003e `JUST_THE_SECOND` //11\r\n\r\n-----------------------\r\n\r\n* Ex: `DATE_AND_TIME`\r\n```pawn\r\nCMD:dateandtime(playerid)\r\n{\r\n    new string[100];\r\n    //\r\n    format(string, sizeof string, \"Date And Time: %s.\", Gettime_Function(DATE_AND_TIME));\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\n-----------------------\r\n\r\n* Ex: `ONLY_THE_DATE`\r\n```pawn\r\nCMD:date(playerid)\r\n{\r\n    new string[100];\r\n    //\r\n    format(string, sizeof string, \"Date: %s.\", Gettime_Function(ONLY_THE_DATE));\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\n-----------------------\r\n\r\n* Ex: `JUST_THE_TIME`\r\n```pawn\r\nCMD:time(playerid)\r\n{\r\n    new string[100];\r\n    //\r\n    format(string, sizeof string, \"Time: %s.\", Gettime_Function(JUST_THE_TIME));\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\n-----------------------\r\n\r\n* Ex: `DATE_WHITOUT_SECONDS`\r\n```pawn\r\nCMD:date(playerid)\r\n{\r\n    new string[100];\r\n    //\r\n    format(string, sizeof string, \"Date: %s.\", Gettime_Function(DATE_WHITOUT_SECONDS));\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\n-----------------------\r\n\r\n* Ex: `DATE_WHITOUT_YEAR`\r\n```pawn\r\nCMD:date(playerid)\r\n{\r\n    new string[100];\r\n    //\r\n    format(string, sizeof string, \"Date: %s.\", Gettime_Function(DATE_WHITOUT_YEAR));\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\n-----------------------\r\n\r\n* Ex: `TIME_WITHOUT_SECONDS`\r\n```pawn\r\nCMD:time(playerid)\r\n{\r\n    new string[100];\r\n    //\r\n    format(string, sizeof string, \"Time: %s.\", Gettime_Function(TIME_WITHOUT_SECONDS));\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\n-----------------------\r\n\r\n* Ex: `JUST_THE_YEAR`\r\n```pawn\r\nCMD:year(playerid)\r\n{\r\n    new string[100];\r\n    //\r\n    format(string, sizeof string, \"Year: %s.\", Gettime_Function(JUST_THE_YEAR));\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\n-----------------------\r\n\r\n* Ex: `JUST_THE_MONTH`\r\n```pawn\r\nCMD:month(playerid)\r\n{\r\n    new string[100];\r\n    //\r\n    format(string, sizeof string, \"Month: %s.\", Gettime_Function(JUST_THE_MONTH));\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\n-----------------------\r\n\r\n* Ex: `JUST_THE_DAY`\r\n```pawn\r\nCMD:day(playerid)\r\n{\r\n    new string[100];\r\n    //\r\n    format(string, sizeof string, \"Day: %s.\", Gettime_Function(JUST_THE_DAY));\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\n-----------------------\r\n\r\n* Ex: `JUST_THE_HOUR`\r\n```pawn\r\nCMD:hour(playerid)\r\n{\r\n    new string[100];\r\n    //\r\n    format(string, sizeof string, \"Hour: %s.\", Gettime_Function(JUST_THE_HOUR));\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\n-----------------------\r\n\r\n* Ex: `JUST_THE_MINUTE`\r\n```pawn\r\nCMD:minute(playerid)\r\n{\r\n    new string[100];\r\n    //\r\n    format(string, sizeof string, \"Minute: %s.\", Gettime_Function(JUST_THE_MINUTE));\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\n-----------------------\r\n\r\n* Ex: `JUST_THE_SECOND`\r\n```pawn\r\nCMD:second(playerid)\r\n{\r\n    new string[100];\r\n    //\r\n    format(string, sizeof string, \"Second: %s.\", Gettime_Function(JUST_THE_SECOND));\r\n    SendClientMessage(playerid, 0xFFFFFFFF, string);\r\n    //\r\n    return true;\r\n}\r\n```\r\n\r\n-----------------------\r\n\r\nIf you prefer not to define the `Gettime_Function` callback with the previously mentioned definitions, you can assign specific values to them. Just check the `Note` for the number that represents each definition.\r\n\r\n-----------------------\r\n\r\n### Contact Information\r\n\r\nInstagram: [ocalasans](https://instagram.com/ocalasans)   \r\nYouTube: [Calasans](https://www.youtube.com/@ocalasans)   \r\nDiscord: ocalasans   \r\nCommunity: [SA:MP Programming Community©](https://abre.ai/samp-spc)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focalasans%2FGettime-Functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focalasans%2FGettime-Functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focalasans%2FGettime-Functions/lists"}