Date Reference

The rules behind date calculations, explained once and in full: how the calendar is built, how days and months are counted, and how timestamps and time zones work.

Whether the first day counts, what one month after 31 January is, and which week 1 January belongs to all have more than one accepted answer. These pages explain the rules and their alternatives with worked examples, and link to the calculators that apply them.

How the calendar works

Counting and date arithmetic

Timestamps and time zones

How DateUtils calculates