Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD recognize weeks #345

Open
allanlaal opened this issue May 26, 2022 · 3 comments
Open

ADD recognize weeks #345

allanlaal opened this issue May 26, 2022 · 3 comments

Comments

@allanlaal
Copy link

examples:

week nr 23
wk 23
week №23
week # 23
W23
2022#23
first day 9 AM of 2022#23
week number 23
first day 9 AM of 2022 week number 23
2022 week 23 first day 9 AM
2022 week nr 23
2022W23 // ISO format
@kylekatarnls
Copy link
Contributor

For the record, ISO format is already supported by PHP DateTime so both Carbon and JenssegersDate inherit it:

new \DateTime('2022W23')
new \Carbon\Carbon('2022W23')
new \Jenssegers\Date\Date('2022W23')

Maybe some other syntax are also natively supported this way.

@allanlaal
Copy link
Author

upstream: briannesbitt/Carbon#2617

but detecting "week" and its formats is a heavily localized thing

@allanlaal
Copy link
Author

upstream said no, so this has to be completed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants