How the date is worked out
The date and time come from your device's clock and time zone, so they are correct wherever you are. Someone in London, New York and Karachi can see different dates at the same moment around midnight.
Day of the year and week number
The day of the year counts from 1 January (day 1) to 31 December (day 365, or 366 in a leap year). The week number follows ISO 8601: weeks start on Monday and week 1 is the week containing the year's first Thursday — the system used in the UK, Europe and most business calendars.