Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have worked on a widely deployed product that _internally_ uses something similar: 28 month days, 13 months to a year. Data is aggregated in the product into daily, weekly, monthly, and yearly aggregate files. It does two things differently from the article: 1) it doesn't add a day at the end of the year to get to 365 (28 * 13 == 364, 1.25 days short of a normal year), and 2) it considers the beginning of time to be Jan _4_, 1970, not the more typical Jan 1. This was chosen so that each of the weekly data files started on a Sunday, as opposed to a Thursday which is what Jan 1, 1970 was. The most fun consequence of this odd scheme came up when I was trying to figure out what date a yearly data file should start on. Eventually I figured out the pattern, and realized that the date is slowly drifting backwards, starting from Jan 4, 1970, at a rate of 1.25 days per year from 1970 due to only having 364 days per year. It's been 52 years, and so the current year file starts in late October this year.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: