Wrong week numbers in report with Gregorian calendar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2022 04:58 AM
Hi,
I have a report where I want to see the week numbers instead of date. I found the week number by using the Gregorian calendar, only the calendar is showing the wrong week number in reports.
Looking at the Gregorian calendar configuration, the calendar start counting weeks from 1 January. It should start counting from 3 January. 1-2 January is week 52. This is the European standards. Example: Jan 31 – Feb 7 is week 5, not 6.
Is there someone who has a solution for this or has created a calendar to use with European standards?
Thanks.
- Labels:
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 02:14 AM - edited ‎10-14-2022 08:28 AM
Try adding the Timezone offset first. Or is there some fundamental 2023 calendar template difference between how both regions represent the weeks?
var gdt = new GlideDateTime();
gdt.add(gdt.getTZOffset());
gs.print(gdt.getWeekOfYearLocalTime());