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

A couple of days ago I created a career stackoverflow profile. I'm looking daily to see if anyone has visited my profile. It says

this week 7 visits, today 3

How is this counting? If I'm not wrong in other places/countries week starts on Sunday, here it starts at Monday. And what about timezones? When it says today it means past midnight at which timezone? I guess it isn't locally.

share|improve this question
1  
Stack Exchange uses UTC time. –  juergen d Dec 22 '13 at 19:42
1  
I'd assume "this week" means "within the last seven days" –  ThiefMaster Dec 22 '13 at 20:09
    
@ThiefMaster Thnx I guess this is obvious for some of you. –  giannis christofakis Dec 22 '13 at 20:14

1 Answer 1

up vote 2 down vote accepted

This is the code used to generate these time periods.

var now = DateTime.UtcNow;
var thisMonth = now.AddDays(-30);
var thisWeek = now.AddDays(-7);
var today = now.AddDays(-1);

Since this is just candy data and not used as input to any other function, we just do a quick and dirty calculation.

share|improve this answer
    
Your hat is misplaced a bit :) –  Shadow Wizard Dec 23 '13 at 11:11
    
@ShadowWizard how's that? :) –  NickLarsen Dec 23 '13 at 12:57
    
Much better, and fitting! ;) –  Shadow Wizard Dec 23 '13 at 13:00

You must log in to answer this question.

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