[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-289829-105":59,"doc-detail-289829-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","aweek-convert-dates-to-arbitrary-week-definitions","aweek - Convert dates to arbitrary week definitions","","aweek is a lightweight solution for converting dates to week representations where the week can start on any weekday. The package defines an aweek class that can translate between dates, datetimes, and week-based forms including week numbers with years and ISO week strings. It provides utilities to set and query the global week_start, convert in both directions, and manipulate aweek objects while keeping week_start consistent when combining or changing definitions.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/aweek-convert-dates-to-arbitrary-week-definitions/289829/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/aweek-convert-dates-to-arbitrary-week-definitions/289829.png","ImageObject",300,407,{"name":92,"@type":93},"Elsa","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-07","2026-09-17",true,{"@type":102,"interactionType":103,"userInteractionCount":34},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"How do I choose which weekday the weeks start on in aweek?","Question",{"text":112,"@type":113},"Use set_week_start() to set the global week_start option. get_week_start() returns the current default.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"Which functions convert dates to week objects?",{"text":117,"@type":113},"date2week() converts dates, datetimes, and date-like characters to weeks, while as.aweek() is a wrapper that performs the same conversion.",{"name":119,"@type":110,"acceptedAnswer":120},"How can I convert ISO week strings back to dates?",{"text":121,"@type":113},"Convert ISO-week formatted strings (YYYY-Www-d or YYYY-Www) using week2date() for Date output, or as.aweek() followed by as.Date() depending on the workflow.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},289829,1790486175,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":34,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":56,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":143,"read_time":144},137455077381,"https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","Package ‘aweek’  \nMay 7, 2026  \nTitle Convert Dates to Arbitrary Week Definitions Version 1.0.3  \nDescription Which day a week starts depends heavily on the either the local or professional context. This package is designed to be a lightweight solution to easily switching between week-based date definitions.  \nDepends R (>= 3.0) License MIT + file LICENSE Encoding UTF-8  \nSuggests testthat, stats, roxygen2, knitr, rmarkdown, covr, spelling RoxygenNote 7.2.1  \nURL [https://www.repidemicsconsortium.org/aweek/](https://www.repidemicsconsortium.org/aweek/)  \nBugReports [https://github.com/reconhub/aweek/issues/](https://github.com/reconhub/aweek/issues/)  \nVignetteBuilder knitr Language en-US NeedsCompilation no  \nAuthor Zhian N. Kamvar [aut, cre]  \nMaintainer Zhian N. Kamvar \u003C[zkamvar@gmail.com](zkamvar@gmail.com)> Repository CRAN  \nDate/Publication 2022-10-06 03:20:11 UTC  \nContents  \naweek-package ....................................... 2  \nas.aweek ........................................... 4  \n[as.data.frame.aweek .....................................](as.data.frame.aweek ..................................... 6)[ 6](as.data.frame.aweek ..................................... 6)  \n[as.Date.aweek ........................................](as.Date.aweek ........................................ 7)[ 7](as.Date.aweek ........................................ 7)  \n[change_week_start .....................................](change_week_start ..................................... 8)[ 8](change_week_start ..................................... 8)  \n[date2week ..........................................](date2week .......................................... 9)[ 9](date2week .......................................... 9)  \n[factor_aweek ........................................](factor_aweek ........................................ 12)[ 12](factor_aweek ........................................ 12)  \n[get_aweek ..........................................](get_aweek .......................................... 12)[ 12](get_aweek .......................................... 12)  \n[print.aweek .........................................](print.aweek ......................................... 15)[ 15](print.aweek ......................................... 15)  \n[set_week_start ........................................](set_week_start ........................................ 17)[ 17](set_week_start ........................................ 17)  \n2 aweek-package  \nIndex 19  \n\n| aweek-package | Convert dates to weeks and back again |\n| --- | --- |\n\nDescription  \nThe aweek package is a lightweight solution for converting dates to weeks that can start on any weekday. It implements the aweek class, which can easily be converted to date and weeks that start on different days.  \nBefore you begin  \nWhen you work with aweek, you will want to make sure that you set the default week_start variable to indicate which day of the week your weeks should begin. This can be done with set_week_start() . It will ensure that all of your weeks will begin on the same day.  \n• get_week_start() returns the global week_start option  \n• set_week_start() sets the global week_start option  \nConversions  \nDates to weeks:  \nThis conversion is the simplest because dates are unambiguous.  \n• date2week() converts dates, datetimes, and characters that look like dates to weeks  \n• as.aweek() is a wrapper around date2week() that converts dates and datetimes  \nWeek numbers to weeks or dates:  \nIf you have separate columns for week numbers and years, then this is the option for you. This allows you to specify a different start for each week element using the start argument.  \n• get_aweek() converts week numbers (with years and days) to aweek objects.  \n• get_date() converts week numbers (with years and days) to Dates.  \nISO week strings (YYYY-Www-d or YYYY-Www) to weeks or dates:  \n• as.aweek() converts ISO-week formatted strings to aweek objects.  \n• week2date() converts ISO-week formatted strings to ","cbCaihceTB1ygcjN","https://ap.wps.com/l/cbCaihceTB1ygcjN","pdf",142410,"English","# aweek-package\n## Before you begin\n## Conversions\n## Manipulating aweek objects\n## Examples","[{\"question\":\"How do I choose which weekday the weeks start on in aweek?\",\"answer\":\"Use set_week_start() to set the global week_start option. get_week_start() returns the current default.\"},{\"question\":\"Which functions convert dates to week objects?\",\"answer\":\"date2week() converts dates, datetimes, and date-like characters to weeks, while as.aweek() is a wrapper that performs the same conversion.\"},{\"question\":\"How can I convert ISO week strings back to dates?\",\"answer\":\"Convert ISO-week formatted strings (YYYY-Www-d or YYYY-Www) using week2date() for Date output, or as.aweek() followed by as.Date() depending on the workflow.\"}]","aweek - Convert dates to arbitrary week definitions | PDF",1789637520,48]