{"id":18357003,"url":"https://github.com/win-le/w-date","last_synced_at":"2025-10-09T13:09:32.525Z","repository":{"id":52861301,"uuid":"282560859","full_name":"win-le/w-date","owner":"win-le","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-31T10:40:59.000Z","size":118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T13:09:31.853Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/win-le.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}},"created_at":"2020-07-26T02:29:05.000Z","updated_at":"2021-05-31T10:41:02.000Z","dependencies_parsed_at":"2022-08-23T11:00:29.497Z","dependency_job_id":null,"html_url":"https://github.com/win-le/w-date","commit_stats":null,"previous_names":["win-le/w-date","khacywin/wdate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/win-le/w-date","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/win-le%2Fw-date","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/win-le%2Fw-date/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/win-le%2Fw-date/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/win-le%2Fw-date/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/win-le","download_url":"https://codeload.github.com/win-le/w-date/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/win-le%2Fw-date/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001539,"owners_count":26083102,"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-10-09T02:00:07.460Z","response_time":59,"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":[],"created_at":"2024-11-05T22:12:30.478Z","updated_at":"2025-10-09T13:09:32.491Z","avatar_url":"https://github.com/win-le.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# w-date\n\u003e __w-date__ is module handles with Date\n\n### Install\n```\n  npm install w-date\n```\n\n### Usage \n```\n  import wdate from 'w-date';\n```\n\n### Functions\n\n###### now()\n```\n  wdate.now(); \n```\n\n###### identifyDate(date)\n* __date__(required) - string | object\n```\n  wdate.identifyDate('11/20/2020 8:30'); \n  //Returns: DateObject(): Fri Nov 20 2020 08:30:00 GMT+0700 (Indochina Time)\n```\n\n###### format(date, format='YYYY-MM-DD')\n* __date__(required) - string | object\n```\n  wdate.format('11/20/2020 8:30'); \n  //Returns: 2020-11-20\n```\n\n###### numberOfDays(date)\n* __date__(required) - string | object\n```\n  wdate.numberOfDays('11/20/2020 8:30'); \n  //Returns: 30\n```\n\n###### firstWeekdayInMonth(date)\n* __date__(required) - string | object\n```\n  wdate.firstWeekdayInMonth('07/27/2020 8:30'); \n  //Returns: 3\n```\n\n###### nextMonth(date)\n* __date__(required) - string | object\n```\n  wdate.nextMonth('07/27/2020 8:30'); \n  //Returns: Date\n```\n\n###### previousMonth(date)\n* __date__(required) - string | object\n```\n  wdate.previousMonth('07/27/2020 8:30'); \n  //Returns: Date\n```\n\n###### getWeek(date)\n* __date__(required) - string | object\n```\n  wdate.getWeek('07-02-2020 09:55'); \n  //Returns: 27\n```\n\n###### checkNow(date)\n* __date__(required) - string | object\n```\n  wdate.checkNow('07-02-2020 09:55'); \n  //Returns: false\n```\n\n###### getMonthFull(month, region = 'en')\n* __month__(required) - number\n* __region__(optional) - 'en' | 'vi'\n```\n  wdate.getMonthFull(1); \n  //Returns: January\n```\n\n###### getMonthShort(month, region = 'en')\n* __month__(required) - number (0-11)\n* __region__(optional) - 'en' | 'vi'\n```\n  wdate.getMonthShort(0); \n  //Returns: Jan\n```\n\n###### getWeekdayFull(weekday, region = 'en')\n* __weekday__(required) - number (1-7)\n* __region__(optional) - 'en' | 'vi'\n```\n  wdate.getWeekdayFull(1); \n  //Returns: Monday\n```\n\n###### getWeekdayShort(weekday, region = 'en')\n* __weekday__(required) - number (1-7)\n* __region__(optional) - 'en' | 'vi'\n```\n  wdate.getWeekdayShort(1); \n  //Returns: Mon\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwin-le%2Fw-date","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwin-le%2Fw-date","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwin-le%2Fw-date/lists"}