feat: added default date as the start of the current week#239
Open
ShadowFax1731 wants to merge 1 commit into
Open
feat: added default date as the start of the current week#239ShadowFax1731 wants to merge 1 commit into
ShadowFax1731 wants to merge 1 commit into
Conversation
✅ Deploy Preview for emingi ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
CREDO23
requested changes
Aug 4, 2024
CREDO23
left a comment
Collaborator
There was a problem hiding this comment.
@ShadowFax1731, please add the requested changes before we merge your PR.
| }); | ||
|
|
||
| function getStartDayOftheWeek(date) { | ||
| const diff = date.getDate() - date.getDay() + (date.getDay() === 0 ? -6 : 1); |
Collaborator
There was a problem hiding this comment.
@ShadowFax1731 can you explain the logic here ?
I can see that you are trying to handle it manually, try with the momentjs package that already handles the first weekday for different locales:
const firstDayOfWeek = moment().startOf('week').format('YYYY-MM-DD');
CREDO23
requested changes
Aug 4, 2024
|
|
||
| useEffect(() => { | ||
| const getLocation = async (lat, lon) => { | ||
| try { |
Collaborator
There was a problem hiding this comment.
@ShadowFax1731, as mentioned in the issue #230, we need this feature on the 'Top Africa page` (for now) !
So please, use it only on the 'Top Africa' page
Collaborator
|
Hi @ShadowFax1731, are still working on changes requested ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Set the default date in the form to be the start of the current week.
Changements Effectués
Implemented a function that takes in the current date and returns out the start of the current week.
Liste de Vérification
Merci !