aws / aws/aws-appsync-community
VTL - current week index
- Dominant language
- HTML
- Stars
- 507
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I try to get the current week index of the year. I am using the $util.time.nowFormatted VTL function with the string input type "w" ([https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html](https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html)). I tried it a testing environment but in AppSync I am getting back the number 32. But currently we have the week index 31 in germany.
So is it right the lowercase "w"? And if its right why is the result one week in the future?
response mapping template:
```$util.time.nowFormatted("w")```
Contributor guide
Research direction
Start with the response mapping template entry point, `$util.time.nowFormatted("w")`, and compare its behavior with the linked Java SimpleDateFormat documentation. Determine whether lowercase `w` is supported in AppSync and document the expected week index behavior, including the reported difference between AppSync and Germany.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, graphql
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100