9 ms·
ISO week date
- jeltz 7y agoISO week numbers are used a lot in some industries here in Sweden. For example education, so everyone here has encountered them at some point in their lives.
- thbo 7y agoIt’s the first thing I (Norwegian) turn on (or miss) in calendar implementations. Most things are based on week number here too.
- kij 7y agoDitto for Denmark. Used to have an .ics laying around for that purpose.
- GordonS 7y agoI'm British, but have been working with Norwegian companies for many years, and while it took a while, week numbers now feel very natural. For those in English locales, Outlook has an option to enable week numbers in calendar views, and mobile calendar apps have this option too (at least the ones I've used).
- Asturaz 7y agoA common way at Volvo Cars is to write and talk about dates in this way; week two day three, or 20wk02d3 or just 20w02d3. Which would translate to Wednesday January 8th year 2020 It is useful for deadlines because you always now how many weeks it is left.
- mstade 7y agoAs a Swede I'd say week numbers are pretty ubiquitous in Sweden, with perhaps the first exposure to using week numbers being primary school. I remember counting down to week 9 (spring break) and, I guess, all the other breaks too. Aside from this though, I could never quite get the hang of week numbers and always just found them more confusing than using dates. When my friends say they're going on their summer holidays in weeks 30-32 or whatever it may be, I never know what that means. Is it July? June? August even? I have no idea, and I always have to ask for dates anyway, or look at a calendar, because I can't figure it out in my head.
- mongol 7y agoWeek 9 is the only week I know "by heart", for this reason. All other weeks I can only relate to by looking in the calendar.
- javerikr 7y agoCould this be the one of the reasons ISO week dating was chosen as the format for Minecraft snapshots?
- mikl 7y agoThat is a surprising amount of complexity, really makes you glad that ISO ironed out all the details, so when I recently told our development team composed of Swiss, German, Portuguese and Danish people that we would be going live in week 4 (of 2020), everyone understood just fine. I still find it strange that some countries have not adopted week numbers. Sure, you can say something like "the week of December 21st", but simply saying "week 52" is so much easier, and if you, like many software teams do, work in two week sprints, it saves you from a lot of date math.
- savolai 7y agoI find week numbers very cumbersome to use. Most calendars don't have them by default and most everyday interactions around dates don't involve them. As a result it's a burdensome and unroutined lookup in some arbitrary calendar somewhere just to figure out ballpark distances from current moment. I much prefer date ranges.
- _jal 7y agoIt is a communicative convention. If you're the only person following a convention, it isn't. At least this is an additive one - unlike imperial/metric, it isn't a unit replacement. Even if you like "better" measures, you may want to stick with local ones. Little story - I noodle around with metalwork, and have some machinery. Because I lived in Europe for a bit, I am comfortable with metric, and metric mental math is so much less error prone that when I was choosing machinery, I went metric. That was a mistake. Everyone I've had in my shop freaks out. All the little rules of thumb and patterns for remembering relations between, say, feed rate to mill spindle speed for a particular alloy go out the window. Reading documentation and how-to texts written in the US puts you right back at doing lots of math in weird bases in your head. And so on. It is fine, I'm happy with my setup. But there are reasons not to pick the "better" method. And those reasons perpetuate the existence of the other ones.
- blattimwind 7y ago> I went metric. That was a mistake. It might be a mistake in the US, but of course machine shops outside the US are all metric - conversely, operating an imperial machine shop might be quite annoying outside the US. > It is fine, I'm happy with my setup. But there are reasons not to pick the "better" method. And those reasons perpetuate the existence of the other ones. Interestingly the US industry didn't switch to metric citing "conversion cost" (in the late 19th / early 20th century). Instead we continue to waste billions every year since: keeping double stock, projects failing (see: space), US engineers struggling with the system everyone else uses (and vice versa, though to a lesser extent, since US-made components and machinery are relatively irrelevant in industry) etc.
- mikro2nd 7y agoNote that `strftime` (and implementations dependent on it - hello Python!) do not implement ISO week numbers. In `strftime` all days preceding the first Sunday/Monday (depending which date-code you pass to the function) in a year are classified as "Week 0" as opposed to the ISO definition. This means that `strftime` week numbers are generally 1 less than the ISO week number. As serendipity would have it I was delving into this issue just this morning... :O
- jontro 7y agoYeah, there is a lot of languages missing iso week support. Probably because it's not used in the US as much. Found this gist for getting using it in Power BI a couple of weeks ago https://gist.github.com/r-k-b/18d898e5eed786c9240e3804b167a5ca https://gist.github.com/r-k-b/18d898e5eed786c9240e3804b167a5...
- fanf2 7y agoHere is how to format an ISO week date with strftime: “%G-W%V-%u” This is in POSIX https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/functions/strftime.html https://pubs.opengroup.org/onlinepubs/9699919799.2018edition... and C99 http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf Python’s documentation explicitly says it only describes the C89 formatting codes and that C99 has more features. https://docs.python.org/2.7/library/datetime.html#strftime-strptime-behavior https://docs.python.org/2.7/library/datetime.html#strftime-s...
- bshipp 7y agoWhile it's fine and good that ISO has defined week numbers, it has been less than helpful when working with North American firms whose weeks start on Sunday and who expect January 1st to be week 1. I've ended up having to write custom code to handle this in my programs as most generic libraries support ISO and not much else.
- petters 7y agoPython 3.6+ added this.
- betimsl 7y agoAll this complexity because we have to adhere to some pope from 400 years ago. It's just sad.
- deleted 7y ago[deleted]
- andrepd 7y agoAll this complexity with 10,000s of different languages spoken around the world too, yet here we are. Obviously there's no switch you can flip to make billions of people throughout the earth switch to a more practical calendar system (come to think of it, what is even wrong with gregorian?)
- wongarsu 7y agoMost calendar systems are complicated because they have conflicting goals. You just can't divide the year into even, intuitive, useful segments and have it line up with one rotation of earth
- thaumasiotes 7y agoA more traditional approach to the calendar might have January 1st on the same day of the week every year, with a variable period of holidays at the end of the year that aren't part of the normal week system. If we did things that way, the issue of "where should we start week 1?" couldn't even arise.
- jimktrains2 7y agoThere are and have been calenders with intercalendar days, how does that make anything easier? Specifically, not every week would be a full week, which in itself is an exception because now a Monday could be followed by a Sunday.
- thaumasiotes 7y ago> Specifically, not every week would be a full week, which in itself is an exception because now a Monday could be followed by a Sunday. I very explicitly didn't say this. Rather, I said that not every day would be part of a week.
- slantyyz 7y agoThere are also non-ISO variations such as the 445 calendar: https://en.wikipedia.org/wiki/4%E2%80%934%E2%80%935_calendar https://en.wikipedia.org/wiki/4%E2%80%934%E2%80%935_calendar
- bshipp 7y agoIt seems like some people don't understand the use case for week numbers, at least for businesses. They allow the ability for time series comparisons for a work week. Using the calendar date is hopeless because the 21st day of a month could fall on any day of the week. I want to compare the Monday of the first work week of the year to the Monday of the first work week of last year. That's most helpful when trying to understand sales trends, etc.
- aex 7y agoI don't think the following first weeks are comparable by many work metrics: * 30 December 2019 - 5 January 2020 (2020 W01) * 4 January 2021 - 10 January 2021 (2021 W01)
- bshipp 7y agoI don't disagree with you. Some of the decisions that went into the ISO standard are real headscratchers for those of us who have been using North American week numbers
- spectramax 7y agoYep, huge companies like Intel use work-weeks for everything. For e.g. planning huge engineering projects was easy: - WW02-WW16: Conceptual Development - WW17: CDR - WW18-46: Detail Design - WW46-48: DDR - WW48-52: Validation/Testing - WW01-02: Ship to customer So you could just now know how many weeks it took exactly for each phase: - [14] WW02-WW16: Conceptual Development - [1] WW17: CDR - [28] WW18-46: Detail Design - [2] WW46-48: DDR - [4] WW48-52: Validation/Testing - [2] WW01-02: Ship to customer
- inetknght 7y agoI appreciate the usefulness of using weeks to measure time. But on a side note: less than 10% of time assigned for validation/testing and at the very end of a project is, in my experience, extremely ambitious.
- rachelbythebay 7y agoThe real fun with this one is when you use (assuming strftime) %G when you really meant %Y, and so your dates flip out for a few days right around this time of year. What's more, it's a different pattern every year. Twitter, Apple's iOS calendar alarms, the list goes on.
- deleted 7y ago[deleted]
- wruza 7y agoDates are really hard (I mean data type ones, but ymmv). Numerous libraries claim to be “standard” or to cover almost all date/time functions, but rarely do so. Some libraries allow a developer to see a date as a primitive value/breakdown, which may lead to hard to debug issues (unix + 86400, etc). Leap years, leap seconds, DST, “leapy” UTC/GMT+ days, accidental month overflow, shift date vs duration mismatch, etc. If you’re a developer and never scratched this topic, be aware.
- deleted 7y ago[deleted]
- Ididntdothis 7y agoDates and times are really screwed up as far as programming goes and there is not much to do about it since that’s the way the earth rotates around the sun and itself. Maybe we should start looking for a planet that has a precise 100 day year without leap years? That year can then be split into 10 weeks. Programming on this planet would be much easier.
- hansendc 7y agoAs mentioned elsewhere, Intel uses "Work Weeks" for everything. It might be great for manufacturing where a wafer takes a specific number of days to make it through the fab, but it inflicts horrible pain on the folks who have to deal with it and the outside world. My doctor, for instance, stubbornly pretends to not understand when I ask for an appointment in WW04! December 30th, 2019 is WW01.1 2020 in this calendar. I bet no human in the world knows their WW 2020 birthday.
- jbj 7y agoin Denmark it is quite normal to communicate by week numbers rather than dates. works well, some people are not used to it if they didn't grow up with it.
- tingletech 7y agoI wrote a stupid little calendar program that uses ISO weeks https://github.com/tingletech/tingcal https://github.com/tingletech/tingcal