Tomohiko Sakamoto’s algorithm

E638639

Tomohiko Sakamoto’s algorithm is a compact, table-based method for calculating the day of the week for any given date in the Gregorian calendar.

All labels observed (1)

Label Occurrences
Tomohiko Sakamoto’s algorithm canonical 2

How this entity was disambiguated

Statements (42)

Predicate Object
instanceOf algorithm ⓘ
date calculation algorithm ⓘ
day-of-week algorithm ⓘ
advantage requires only a small lookup table ⓘ
simple integer arithmetic only ⓘ
appliesTo Gregorian calendar ⓘ
assumes proleptic Gregorian calendar for all years in implementation ⓘ
basedOn modular arithmetic ⓘ
category calendar algorithm ⓘ
characteristic compact implementation ⓘ
constant time complexity ⓘ
table-based method ⓘ
uses month offset table ⓘ
commonUse calendar utilities ⓘ
date libraries ⓘ
embedded systems date calculations ⓘ
comparedTo Doomsday rule ⓘ
Zeller’s congruence ⓘ
creator Tomohiko Sakamoto ⓘ
handles leap years in the Gregorian calendar ⓘ
implementationLanguage C ⓘ
input day ⓘ
month ⓘ
year ⓘ
mapsTo weekday index 0–6 ⓘ
output day of the week ⓘ
property deterministic ⓘ
does not require floating-point arithmetic ⓘ
non-iterative ⓘ
requires integer division and modulo operations ⓘ
suitableFor programming contest solutions ⓘ
resource-constrained environments ⓘ
timeComplexity O(1) ⓘ
typicalConvention 0 = Sunday ⓘ
1 = Monday ⓘ
2 = Tuesday ⓘ
3 = Wednesday ⓘ
4 = Thursday ⓘ
5 = Friday ⓘ
6 = Saturday ⓘ
usedFor calculating the day of the week ⓘ
computing weekday from a Gregorian calendar date ⓘ

How these facts were elicited

Referenced by (2)

Full triples — surface form annotated when it differs from this entity's canonical label.

Conway’s Doomsday algorithm → relatedTo → Tomohiko Sakamoto’s algorithm ⓘ
Zeller’s congruence → relatedTo → Tomohiko Sakamoto’s algorithm ⓘ