Day of the week

Find the weekday for any supported date.

Gregorian civil dates from years 0001 to 9999, without time or timezone. Gregorian rules are applied even before their historical local adoption. Example: January 1, 2000 was a Saturday.

Your dates and times stay in your browser and are not stored.

Method and assumptions

Method version 1.0.0 · Updated

Weekday of a date

Formula: Gregorian date → weekday

Gregorian civil dates from years 0001 to 9999, without time or timezone. Gregorian rules are applied even before their historical local adoption. Example: January 1, 2000 was a Saturday.

date
Date

Gregorian calendar from years 0001 to 9999. Date, duration and rounding conventions are specified for each mode.

Calculate with code

These short examples use the same inputs and core calculation as this tool. Adapt validation and formatting to your application.

JavaScript
const day = new Date(Date.UTC(2026, 0, 1)).getUTCDay();
console.log(day); // 4 (Thursday; Sunday = 0)
TypeScript
const day: number = new Date(Date.UTC(2026, 0, 1)).getUTCDay();
console.log(day); // 4 (Thursday; Sunday = 0)
Python
from datetime import date
print(date(2026, 1, 1).weekday())  # 3 (Thursday; Monday = 0)
Java
var day = java.time.LocalDate.of(2026, 1, 1).getDayOfWeek();
System.out.println(day); // THURSDAY
C#
var day = new DateOnly(2026, 1, 1).DayOfWeek;
Console.WriteLine(day); // Thursday