What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

Here's something silly I noticed:

My user page says I have been a member for: 1 year, 12 months.

I'm sure there's a great programming reason why that doesn't say 2 years, but it is probably confusing to most people.

Added image for posterity, since the problem should be gone soon: alt text

share|improve this question
3  
It'll be 3 days before you actually hit 2 years, and the time display does not round up. So what I'm thinking is, the month calculation isn't about actual months but maybe just "30 days". You haven't hit the full year, but you are within 360 days. That's just a guess, though. –  Grace Note Aug 18 '10 at 12:40
2  
@Grace, my programming brain says, "Yeah, that makes sense" but my user brain says, "What?" Since StachExchange is now for the masses, I wonder if the logic should just round down since that's how we tend to mark the progress of time (unless you're East Asian: en.wikipedia.org/wiki/East_Asian_age_reckoning). My case would just say 1 year, 11 months until I actually hit 2 years. –  Richard Morgan Aug 18 '10 at 12:50
    
Related: Improve the accuracy of time strings. It used to just say "1 year" until you hit "2 years". –  Andy E Aug 18 '10 at 12:53
1  
I don't disagree that it is absolutely confounding to users. Also, @Andy, I knew it had to be you behind this! I still remember that huge back-and-forth we had on the subject. –  Grace Note Aug 18 '10 at 12:55
21  
I think the real problem is the floating piano... –  jjnguy Aug 18 '10 at 13:02
    
@Grace: yeah, I had another read through that when I linked the post. Good times! Although I think I agree with the stuff you said a lot more now. –  Andy E Aug 18 '10 at 15:51
    
It's probably 1 year + x where $x\in [11.5,12.0)$ (now add TeX to meta.SO...) –  Tobias Kienzler Aug 19 '10 at 12:11
3  
I just start worrying if it says 1 year and 13 months. –  Toon Krijthe Sep 13 '10 at 21:36
    
@Richard Morgan: My brain doesnt see how it make sense. Wouldnt there be a %12 or a /12 preventing this from happening. Maybe its rounded up by some other code but thats confusing! –  acidzombie24 Sep 23 '10 at 14:15
2  
They're going to fix it on February 30 –  Andrew Grimm Oct 18 '10 at 11:19

2 Answers 2

Well, I haven't been proven wrong yet, so I'm going to upgrade my comment to an answer.

My interpretation is that the "Years" calculation cares about how many full years have gone by since registration, so you need to actually pass the specified date that you first started. However, the "Months" calculation doesn't care about actual months, but simply 30 days. So when you are in the narrow period of time between 360 days from the start date and your next anniversary, then it will display "1 year, 12 months".

This bug appears to always happen in near proximity to the actual date of 2 years. Thus far it has always been brought up within 3 days of the date, but my expectation is that it will extend to be within 5 days. I have no clue how a leap year will be treated, especially if you registered on the 29th. We'll have to wait until 2012 for that, though, I imagine.

It's confounding, but it's the most plausible explanation I can think of for why this is happening, from a coding standpoint. Months are stupidly inconsistent in their lengths.


Decided to plume through the Stack Overflow users sorted by "oldest". The boundary appears to be based entirely on the day, as the turnover time is at Midnight UTC instead of mattering what the current time is compared to the time of registration. It does appear to be a 5 day span as I predicted, but mysteriously it starts one day later than the current day. For reference, this data was compiled when:

the current time is 2010-09-27 12:41:11Z

User azollman is the end of the 2 year counts and has been a member for

2 years (2008-09-28 23:22:06Z)

The immediately following user, CJCraft.com, marks the start of our buggy displays by being a member for

1 year, 12 months (2008-09-29 00:14:29Z)

On the other end of the scale, our span of 1 year, 12 months ends with user [SuperRoach], who has been a member for

1 year, 12 months (2008-10-03 23:37:42Z)

The immediately following user is Townsfolk, who has been a member for

1 year, 11 months (2008-10-04 00:09:48Z)

If I were to check tomorrow on UTC 2008-09-28, then CJCraft should be saying 2 years while Townsfolk should be saying 1 year, 12 months.

share|improve this answer
1  
Is there nothing meaningful in your life, with which you can waste your time? –  Ladybug Killer Sep 27 '10 at 13:13
    
@Ladybug Lots of stuff I can do (and often do) to waste time, but those all require me to be at home. –  Grace Note Sep 27 '10 at 13:16
    
@Grace: So you are wasting the time your employer is paying you for. You should be ashamed. –  Ladybug Killer Sep 27 '10 at 13:20
    
@Ladybug It's time that would otherwise be wasted writing in a text file to pass time while code is compiling or files are being transferred. –  Grace Note Sep 27 '10 at 13:22
1  
@Grace: If you can write novels about uninteresting topics (where other people would need one paragraph), then I think you should ask your employer for a faster compiler and/or machine. Looks like it would be a good investment. –  Ladybug Killer Sep 27 '10 at 13:24
    
@Grace ... all I have to say is if (months > 11) months = 11 :p –  waffles Oct 18 '10 at 3:17
    
@waffles Sometimes the solution is always simple. –  Grace Note Oct 18 '10 at 3:25
if (months > 11) months = 11;

Fixed in dev, will be deployed today or tomorrow. The bug was happening cause we are assuming, somewhat incorrectly, that a year is 365 days; and a month, somewhat incorrectly, is 30 days.

We will no longer display weird 1 year and 12 months for the last five days of your year.

However if you were a member starting Feb 1 and now its March 1 we will not account for you being a member for 1 month.

Similarly on leap years we may tell you were a member for a year 1 day early.

share|improve this answer
4  
Obviously this is the best fix for "all months have 30 days" :) –  Michael Mrozek Oct 18 '10 at 6:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .