What’s the Current Week Number?

this week is…

week 42 is from Monday, October 17, 2022 to Sunday, October 23, 2022 (included).

week number according to the iso-8601 standard, weeks starting from Monday. the first week of the year is the week that contains the first Thursday of that year (=’first 4-day week’). iso rendering: 2022-w42

the highest week number in a year is 52 or 53. 2022 has 52 weeks.

iso 8601 is not the only week numbering system in the world, other systems use weeks starting on Sunday (American) or Saturday (Islamic).

week number lists by year: 2021 – 2022 – 2023 – 2024 …

programming routines

microsoft excel/libreoffice calc

where return type ’21’ is iso-8601 (week starting Monday). in excel 2007, your best choice is week number (today(), 2) (2 = week starting on monday). weeknum(today()) will return the week number with weeks starting from Sunday (return type = 1).

google docs spreadsheet

the type (here ’21’) is compatible with excel/libreoffice, 21 is iso-8601


or date(“w”, epoch) for other week numbers. remember to use uppercase ‘w’ and not ‘w’.



replace the time with other epoch/unix timestamps for other week numbers.


use week_of_year in the calendar class. more information about stack overflow


extend the date class using the code above.


see iso-8601 update on stack overflow


replace now() with other dates, eg. select week of year(‘2022-02-20’); (you can also use the week function with mode=3 select week(now(),3))




iw: week of the year (1-52 or 1-53) according to the iso-8601 standard. ww: week of the year (1-53) where week 1 starts on the first day of the year and continues until the seventh day of the year (mostly not used)

sql string





replace time.now with time.local(year,month,day) for other dates. formats: %u – week number of the year, starting with the first Sunday as the first day of the first week (00..53) %v – iso-8601 week number of the year (01..53) %w – week number of the year, starting with the first Monday as the first day of the first week (00..53)


inside linux/unix (bash)

returns the iso-8601 week number. other formats under ‘ruby’. more details in the linux programmer’s manual


formats: see formats in ‘ruby’.

windows powershell

x++ (microsoft dynamics axe)

c/al (microsoft dynamic navigation):

Thanks to everyone who sent me fixes and updates!

comments and questions

Content Creator Zaid Butt joined Silsala-e-Azeemia in 2004 as student of spirituality. Mr. Zahid Butt is an IT professional, his expertise include “Web/Graphic Designer, GUI, Visualizer and Web Developer” PH: +92-3217244554

Related Posts

What Is an MBA Degree? MBA Programs and What MBA Stands For

· MBA stands for Master of Business Administration. First introduced by Harvard University Graduate School of Administration in 1908 (now Harvard 

Diclofenac – StatPearls – NCBI Bookshelf

· Diclofenac is a medication used in the management and treatment of inflammatory conditions and pain. It is in the class of non-steroidal 

What are the most common types of felonies and their penalties?

A felony is a crime of high seriousness, compared to less serious misdemeanor offenses. In the United States, felonies are generally crimes that have a 

Stem Player: everything you need to know about Kanye West’s portable music player | What Hi-Fi?

· The Stem Player is a pebble-sized MP3 player that doubles as a portable remixer. That means that as well as loading it up with your own tracks, 

What To Do When Your Car Overheats | Jiffy Lube

Here are four of the signs: A strange, sweet smell coming from the engine area (this could be the scent of leaking radiator fluid, otherwise known as coolant 

Impact of Family Engagement | Youth.gov

Family engagement in schools contributes to positive student outcomes, including improved child and student achievement, decreased disciplinary issues, improved