{"id":23159055,"url":"https://github.com/classfunc/use-dayjs","last_synced_at":"2025-04-04T18:41:55.629Z","repository":{"id":41266780,"uuid":"508672802","full_name":"ClassFunc/use-dayjs","owner":"ClassFunc","description":"It's simpler to use dayjs","archived":false,"fork":false,"pushed_at":"2022-10-05T11:23:15.000Z","size":262,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-22T23:15:21.357Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClassFunc.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":"2022-06-29T11:59:49.000Z","updated_at":"2022-07-08T10:05:08.000Z","dependencies_parsed_at":"2023-01-19T06:31:51.899Z","dependency_job_id":null,"html_url":"https://github.com/ClassFunc/use-dayjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Fuse-dayjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Fuse-dayjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Fuse-dayjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Fuse-dayjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClassFunc","download_url":"https://codeload.github.com/ClassFunc/use-dayjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234844,"owners_count":20905852,"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":[],"created_at":"2024-12-17T22:28:51.242Z","updated_at":"2025-04-04T18:41:55.612Z","avatar_url":"https://github.com/ClassFunc.png","language":"JavaScript","readme":"## use-dayjs\n\nSimpler to use dayjs\n\n## Support for\n\n```bash\n- Typescript\n- React js\n- Next js\n- Node js\n```\n\n## Install package\n\n```html\n\nnpm i --save use-dayjs\nyarn add use-dayjs\n\n```\n\n## Use package\n\n```bash\n// Used\n\nimport {djsSetLocale} from \"use-dayjs/locale\";\ndjsSetLocale('vi')\n\n\nimport {djsFormat} from \"use-dayjs/display\";\nimport {djsSet} from \"use-dayjs/calculator\";\nimport {djsDay} from \"use-dayjs/display\";\n\ndjsFormat(\"2022-06-30\", \"YYYY-MM-DD ddd\") //2022-06-30 T5\n\ndjsSet(new Date(), {\n    year: 2025,\n    month: 0\n}) //2025-07-11T08:49:52.569Z\n\ndjsDay(\"2022-07-18\") // 1\n\n```\n\nMore Actions\n\n```html\n1.Calculator\n\ndjsDateOfMonth,\ndjsDayOfWeek,\ndjsDayOfWeekAware,\ndjsDayOfWeekISO,\ndjsSet,\ndjsDayOfYear,\ndjsGet,\ndjsHour,\ndjsMillisecond,\ndjsMinute,\ndjsMonth,\ndjsQuarter,\ndjsSecond,\ndjsWeekInYearISO,\ndjsWeekOfYear,\ndjsWeekYear,\ndjsYear,\ndjsWeek,\ndjsWeekDay,\ndjsDuration,\ndjsDefault,\ndjsDefaultUTC,\ndjsDurationUTC\n\n```\n\n```html\n2.Display\n\ndjsFormat,\ndjsFromNow,\ndjsFromAtTime,\ndjsToAtTime,\ndjsCalendar,\ndjsToNow,\ndjsDiff,\ndjsToDateJs,\ndjsToArray,\ndjsUnix,\ndjsDayInMonth,\ndjsToISOString,\ndjsToJson,\ndjsToObject,\ndjsToString,\ndjsUnixTimestamp,\ndjsParseUTC,\ndjsFormatDDD,\ndjsFormatDDDD,\ndjsFormatDDMM,\ndjsFormatMMDD,\ndjsFormatUTC,\ndjsFormatYYYY,\ndjsFormatYYYYMMDD,\ndjsFormatYYYYMMDDHHMMSSZ,\n\n```\n\n```html\n3.Locale\n\ndjsSetLocale,\ndjsUTCOffset,\ndjsUTC\n\n```\n\n```html\n4.Manipulate\n\ndjsAdd,\ndjsEndOf,\ndjsStartOf,\ndjsSubtract,\n\n```\n\n```html\n5.Parse\n\ndjsParse,\ndjsParseNow,\ndjsParseUTC,\ndjsParseNowUTC,\ndjsNow,\ndjsNowUTC,\ndjsClone\n\n```\n\n```html\n6.Query\n\ndjsBetween,\ndjsBetweenRange,\ndjsIsAfter,\ndjsIsBefore,\ndjsIsDayjs,\ndjsIsLeapYear,\ndjsIsSame,\ndjsSameAfter,\ndjsSameBefore,\ndjsIsSameDate\n\n```\n\n```html\n7.Timezone\n\ndjsTz,\ndjsTzSet,\ndjsToZone,\ndjsTzGuess,\ndjsTzFormat,\ndjsGTM\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclassfunc%2Fuse-dayjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclassfunc%2Fuse-dayjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclassfunc%2Fuse-dayjs/lists"}