6 ms·
No, birthdays are 1 indexed. Your Nth birthday is the day you turn N years old. When you're 1 year old, you've been alive for 1 year, not 2 years.
by atwood22 4y ago
No, birthdays are 1 indexed. Your Nth birthday is the day you turn N years old. When you're 1 year old, you've been alive for 1 year, not 2 years.
- randomdata 4y agoThe moment you are born you are 0 years old (or perhaps 0.75 years old, but we don't usually recognize that). We count from zero in this case, at least implicitly. In some cultures you are considered 1 the moment you are born, so the zero indexing isn't universal here, but typical in North America as noted earlier.
- atwood22 4y agoNo, we don't count from 0. That's like saying we start counting a baker's cup from 0 because you can have half a cup.
- randomdata 4y agoIf we (speaking as a North American) count from 1, does that mean other cultures (e.g. Korean) count from 2?
- atwood22 4y agoNo, it just means we have a different notion of what a year is in regards to age. Similar to how different cultures can use different units of measurement for length, mass, etc.
- randomdata 4y agoYes, exactly. One of which carries an implicit zero indexing. The date of birth doesn't disappear just because you decided to use a different measuring device.
- atwood22 4y agoNo, it doesn’t carry an implicit 0 index. Measuring age (in the West) is like measuring distance. You start at 0, but that doesn’t mean the first item is at index 0.
- randomdata 4y agoIf you took a standard ruler, a measurer of distance and which has literal index marks painted on it, and placed items along it, the item found at the head of the ruler would be found at the 0th index. You're quite right that we think of birth and its anniversaries in the same way.
- samatman 4y agoBirthdays are literally indexed by the moment of birth as zero. You can't possibly be serious.
- kazinator 4y agoWhat do you do for a living, and why are they paying you not to understand this?
- atwood22 4y agoDo you know the definition of countable? A set S is countable if there is a one-to-one mapping from S to N where N is the natural numbers. Do you know that 0 is not a member of the natural numbers? We literally start counting at 1 by definition of countable.
- lupire 4y agoNope. Is the empty set countable? (Yes.) Dictionary: nat·u·ral num·bers the positive integers (whole numbers) 1, 2, 3, etc., and sometimes zero as well Countable: https://en.wikipedia.org/wiki/Countable_set https://en.wikipedia.org/wiki/Countable_set Set theory: https://en.wikipedia.org/wiki/Ordinal_number https://en.wikipedia.org/wiki/Ordinal_number
- atwood22 4y agoFrom your own link on countable sets: > Equivalently, a set S is countable if there exists an injective function f : S → N from S to N; it simply means that every element in S corresponds to a different element in N. Defining N is usually done via a successor set, on which case 0 makes no sense to include.
- lupire 4y agoA successor set is the set of successors of... 0 or 1, depending on what you are doing.
- deleted 4y ago[deleted]
- kazinator 4y agoAn empty set is countable; it has an empty mapping to the natural numbers. Its cardinality is zero.
- kazinator 4y agoThe counting activity doesn't begin when the first item is registered; it begins when the counter is initialized to zero. A decision is made to begin counting, along with the realization that nothing has been counting yet. That's when counting has started. When the first item is seen, the counting is then continuing. Suppose your job is to count some events. You check in for work at 8:00 a.m., but the first event has not registered until noon. By your logic you should not be paid for four hours, because you're paid to count, and counting started at 1.
- atwood22 4y agoNo, the mathematical definition of counting (i.e. whether or not a set is countable) involves mapping to the natural numbers, which doesn’t include 0.
- kazinator 4y agoI don't think your definition is complete. We can count a set by mapping its elements to the natural numbers, and then identifying that number which is highest. However, we must have a provision for identifying zero as the highest when the set and mapping are empty.
- 8note 4y agoMath counting doesn't care where you start. You could start -400 if it's useful for the problem
- lupire 4y agoYou can name things however you want, but there is a canonical bijection to zero-based ordinals. https://en.m.wikipedia.org/wiki/Ordinal_number https://en.m.wikipedia.org/wiki/Ordinal_number
- goatlover 4y agoWhat counter? You're saying a counter exists before people start counting? Is this a form of mathematical Platonism?
- emaginniss 4y agoOk, use the baker and cup as an example. If you have an empty cup and put half of a cup of flour in it, you now have 0.5 cups of flour. Notice the zero before the ".5". That is us, normal humans, realizing that until you add enough to have 1 of something, you have between 0 and 0.999 repeating.
- bregma 4y agoWhen I'm baking I start by zeroing the scale, then adding enough flour to reach 500 g (or whatever the recipe calls for). That's counting from zero.
- 8note 4y agoI start with a empty cup, then I fill it up to 1 cup. I then put it in an initially empty bowl
- samatman 4y agoYes this is correct! The milliliters in a baker's cup are a scale based on 0!
- themacks 4y agoTypical counting of things starts from 0. If you count apples you implicitly start at zero and add 1 for each apple. If you count age, you start at birth (0) and count years; one for each birthday. That isn't zero based. The difference is the index of the item between the starting point and the next item. In zero based this item is number 0, in one based, this item is number 1. The first year of life is generally considered the year following birth.
- dylan604 4y ago>If you count age, you start at birth (0) and count years; one for each birthday. nitpick: unless you were born on Feb 29.
- copperx 4y agoI didn't know that. Do you get to be 1 year old if you are born on Feb 29, to account for leap years?
- dylan604 4y agoYou're just 1/4 of the age of everyone else born the same year. You have the same number of laps around the sun as those people, but you've definitely had fewer birthdays. It's a common joke for leap year babies.
- somat 4y agoI just dealt with this problem(how to store periodic events(including birthdays)). It is a surprisingly difficult problem. After reading up on postgres interval types my latest attempt uses them to store events, where a per year event(like a birthday) is stored as "2 months 15 days". it turns out the postgres project has put quite a bit of thought into making interval types work as expected with regards to months, not an easy task when you consider how difficult it is to treat dates mathematically. The nice part is that now February 29 "just works" the downside is the impedance between how months and days are numbered and a how an offset from the epoch(beginning of the year) is defined. January 3rd(1-3) is stored as "0 months 2 days" as when it hits, 0 months have passed and 2 days have passed. So the specific case of February 29 hits when 1 month has passed and 28 days have passed. 3 years out of 4 this will be the same as "2 months 0 days"(3-1) but every forth year this will be(2-28). As an aside, and the specific reason I went with interval types, every event past feburary 29 works just fine with or without a leapyear, that is, the extra day in the middle does not mess up the offset to days after it. Honestly I curse a little as I wish months and days were 0-based. At least clocks get this right, almost, 12 hour clocks are a special breed of stupid. start at 12, then go to 1 and proceed up to 11. 24 hour clocks properly start at 0. The worst part about 12 hour clocks is that it is almost correct, replace the 12 with a 0 and it every thing be the same but now it makes sense from a moduler math point of view. A special curse is reserved when I think about how there is no year zero. https://www.postgresql.org/docs/13/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT https://www.postgresql.org/docs/13/functions-datetime.html#F...
- brianzelip 4y agoSo how old is a not-yet-1-year old?
- atwood22 4y agoN days or N months depending on how old the baby is.
- randomdata 4y agoAnd it turns out that 0 days, 0 months is 0 years.
- rcoveson 4y agoAnd before an hour has even passed, we'd probably say "minutes old" or perhaps "not even an hour/day old", all to avoid saying "zero days/months/years old". But some might still say zero days old, and they'd be both understood and correct (at least logically if not stylistically). That's the "implicit zero" everybody is talking about. We avoid saying it, but that's just a convention of communcation. Logically it's there. You're zero days old before you're one day old.
- nomel 4y agoElapsed time timers start at 0. Time is continuous. The elapsed time being “out of the womb”, that we call “age”, starts near 0. Five minutes after birth, the baby has been in the world for, or it’s age is, five minutes. If someone asked how old a new baby is you could hear “3 weeks”. Another definition might be from conception. But birth being “one year old” is illogical. The sperm didn’t even exist yet, one year before birth.
- xxs 4y agoYour mistake is using years - use milliseconds (or nanoseconds) when you wish to express a duration. Years don't even have the same duration/length (leap years, and leap seconds)
- csours 4y agoYour birth day is the day you are born. Your first birthday is the first anniversary of your birth day. We celebrate the anniversaries of our birth day.
- treis 4y agoYep, clearer in Spanish. They say cumpleaños which literally means completed year.
- rcoveson 4y agoNo, old calendar systems are one indexed. In those system, there is literally no year zero; the first year is year one. This leads to crazy things like year 100 being part of the "first century" and year 101 being part of the "second century". That is not the case with age or birthdays which are, thankfully, zero indexed. The first year of human life is age=0, birthdays=0.
- lupire 4y agoIt's not "crazy". No one care about which century X00 is. The term "century" doesn't have enough sig figs. X00 is "the turn of the century".
- rcoveson 4y agoIf you don't care then sure, it's not crazy, but if you did care then believe me, it is crazy. Crazy enough that astronomers[0] and software engineers[1] rebelled against the historian's practice and renamed the years preceding 1 AD in the proleptic gregorian calendar year 0, year -1, year -2, et cetera. A major benefit of this is it allows the leap year pattern to stay consistent and the rule to remain legibile for all years, going back before 1 AD. It's also nice because it lets us say "the 90's were the last ten years of the 20th century" and be correct. 0. https://en.wikipedia.org/wiki/Astronomical_year_numbering https://en.wikipedia.org/wiki/Astronomical_year_numbering 1. https://docs.oracle.com/javase/8/docs/api/java/time/temporal/ChronoField.html#YEAR_OF_ERA https://docs.oracle.com/javase/8/docs/api/java/time/temporal...
- deleted 4y ago[deleted]
- samatman 4y agoSo that we don't create more falsehoods programmers believe about dates, ISO has defined decades and centuries as starting with 0, not 1. So as far as your job is concerned, that's when they start. Hope that helps.
- wruza 4y agoHaha, this thing is messed up. Your "first birthday" is technically second, because the first was at your, well, day of birth. But we people love to complicate things and count 1st birthday as a number of annual celebration events after the first mm-dd of birth. Off by one as it is.