Calendar Week Number: 2012-35

Current week of year! Always looking up the current calendar week number? No Problem. Here it is! Find the calendar week numbers for the next years. Check dates, timestamps and daylight saving time of weeks.



Current Week

Calendar Week 35 in 2012

Mon. 2012-08-27 — Sun. 2012-09-02


Week 35 of Year 2012

Week Number35
StartsMon. 2012-08-27
EndsSun. 2012-09-02
Your TimezoneAmerica/New_York
Timezone OffsetEDT (-04:00)
Daylight SavingYes (2012-09-02)
TimestampsFrom 1346040000 to 1346644799
ISO 8601 Week2012W35
ISO 8601 Year / Week2012 / 35
Set DateSun. 2012-09-02
All weeks of 2012: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52

Activate Calendar Weeks in Outlook 365

To show the week number in your Outlook calendar, you have to activate this in your calendar settings. Go to Settings => Calendar => View (HERE) and activate the option: "Show week numbers". Outlook 365 week numbers setting


Getting Week numbers in Excel 365

You can calculate the week number in Excel 365 from a date with the ISOWEEKNUM() function. There is also a second function for week numbers. WEEKNUM() starts counting in the week of January 1st. The ISO weeks starts with 1 in the week with the first Thursday of the year.

The functions WEEKNUM() and ISOWEEKNUM() are also available in Google Spreadsheets. Excel 365 week numbers


About Week Numbers

Weeks in a Gregorian calendar year can be numbered for each year. This style of numbering is often used in European and Asian countries. It is less common in the U.S. and elsewhere.

The system for numbering weeks is the ISO week date system, which is included in ISO 8601. This system dictates that each week begins on a Monday and is associated with the year that contains that week's Thursday.

More on Wikipedia: Week Numbering


First week of year - Week W01

The first week is the week with the starting year's first Thursday in it (the formal ISO definition). There are some other definitions with the same result: The week with 4 January in it, the first week with the majority (four or more) of its days in the starting year or the week starting with the Monday in the period 29 December - 4 January.

Week 1 (W01) of 2012 goes from 2012-01-02 to 2012-01-08.

More on Wikipedia: ISO 8601


Last week of year - Week W52

28. December is always in the last week of its year. The week number can be described by counting the Thursdays: week 12 contains the 12th Thursday of the year.

Week 52 (W52) of 2012 goes from 2012-12-28 to 2013-01-03.

More on Wikipedia: ISO 8601


Current Week Numbers in Different Programming Languages

Current Week number in PHP
$week = date('W');
Week number from Date in PHP
$localDate = new \DateTime();
$localDate->setISODate(2012, 35);
$localDate->setTime(0, 0);
Javascript Current Week
Date.prototype.getWeek = function () {

    var target = new Date(this.valueOf());
    var dayNr = (this.getDay() + 6) % 7;

    target.setDate(target.getDate() - dayNr + 3);

    var firstThursday = target.valueOf();
    target.setMonth(0, 1);

    if (target.getDay() !== 4) {
        target.setMonth(0, 1 + ((4 - target.getDay()) + 7) % 7);
    }

    return 1 + Math.ceil((firstThursday - target) / 604800000);
}

var aDate = new Date('2012-09-01');
alert(aDate.getWeek()); // Result: 35

Current Week in Python
from datetime import date
weekNumber = date.today().isocalendar()[1]
Calendar Week in Java
Calendar calendar = new GregorianCalendar();
calendar.set(2012, 9, 1);
int weekOfYear = calendar.get(Calendar.WEEK_OF_YEAR); // Result: 35
Current Week with MySQL
SELECT WEEKOFYEAR(NOW());
SELECT WEEKOFYEAR('2021-01-02');
Current Week with GO
import "fmt"
import "time"

var timeNow := time.Now()
var _, wkNum := timeNow.ISOWeek()
Current Week with C
#include <stdio.h>
#include <time.h>

int main()
{
    time_t rawtime;
    struct tm * timeinfo;
    char buffer [80];

    time (&rawtime);
    timeinfo = localtime (&rawtime);

    strftime (buffer,80,"Week: %U",timeinfo);
    puts (buffer);

    return 0;
}
Current Week with C#
using System;
using System.Globalization;

public class SamplesCalendar  {
   public static void Main()  {
      CultureInfo myCI = new CultureInfo("en-US");
      Calendar myCal = myCI.Calendar;

      CalendarWeekRule myCWR = myCI.DateTimeFormat.CalendarWeekRule;
      DayOfWeek myFirstDOW = myCI.DateTimeFormat.FirstDayOfWeek;

      Console.WriteLine( "Week: {0}", myCal.GetWeekOfYear( DateTime.Now, myCWR, myFirstDOW ));
   }
}