{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreidl4j2oapsks525kjr4uw4te42dtigeavbiqwxi76nkpc4z22bybe",
"uri": "at://did:plc:4n6wgsqsqm6q2hjncgwmreey/app.bsky.feed.post/3mhtr2xuojqn2"
},
"path": "/post/47720263",
"publishedAt": "2026-03-24T17:43:57.000Z",
"site": "https://programming.dev",
"tags": [
"Programming",
"null4141",
"17 comments",
"https://www.jpvalencia.com/en/blog/january-1st"
],
"textContent": "submitted by null4141 to programming\n62 points | 17 comments\nhttps://www.jpvalencia.com/en/blog/january-1st\n\nThe other day at work I stumbled upon this bug and thought it was worth to write a blog post about. Spoiler: It has nothing to do with timezones!\n\nTLDR: According to ISO standard 8601 (which is what Python’s `date.isocalendar().week` uses for example), the first week of the year is the week with the first Thursday of the year. So sometimes the first few days of January belong to the last week of previous year, and sometimes the last few days of December belong to the first week of next year :D",
"title": "January 1st is not always on the first week of the year"
}