Slimona (Acomplia) For Sale
Slimona (Acomplia) For Sale, It's been a while since we've had a reader question, so here's one for you all. It's not that I can't solve this problem; it's more that I'm wondering if there's a more elegant solution, where can i buy Slimona (Acomplia) online. Slimona (Acomplia) wiki, The Problem: Given two dates, what's the easiest way of determining if they fall in the same week, Slimona (Acomplia) price, coupon. Herbal Slimona (Acomplia), Please submit your answers as a comment. Slimona (Acomplia) duration. Slimona (Acomplia) use. Buy Slimona (Acomplia) online cod. Slimona (Acomplia) photos. Slimona (Acomplia) street price. Slimona (Acomplia) schedule. Slimona (Acomplia) coupon. Slimona (Acomplia) interactions. What is Slimona (Acomplia). Purchase Slimona (Acomplia). Slimona (Acomplia) forum. Buy Slimona (Acomplia) online no prescription. Order Slimona (Acomplia) no prescription. Slimona (Acomplia) blogs. Slimona (Acomplia) mg. Slimona (Acomplia) from canadian pharmacy. Slimona (Acomplia) gel, ointment, cream, pill, spray, continuous-release, extended-release. Slimona (Acomplia) used for. Slimona (Acomplia) photos. Is Slimona (Acomplia) addictive. Slimona (Acomplia) dangers. Order Slimona (Acomplia) from United States pharmacy. Kjøpe Slimona (Acomplia) på nett, köpa Slimona (Acomplia) online. Buy Slimona (Acomplia) without prescription. Slimona (Acomplia) brand name. Taking Slimona (Acomplia). Is Slimona (Acomplia) safe. Slimona (Acomplia) online cod. Slimona (Acomplia) pics. Slimona (Acomplia) for sale. Slimona (Acomplia) results.
Similar posts: Buy Zytrim (Ultram) Without Prescription. Rimonabant (Acomplia) For Sale. Ixprim (Tramadol) For Sale. Online Finax (Propecia) without a prescription. Buy cheap Zimulti (Acomplia). Real brand Salamol (Ventolin) online.
Trackbacks from: Slimona (Acomplia) For Sale. Slimona (Acomplia) For Sale. Slimona (Acomplia) For Sale. Slimona (Acomplia) forum. Slimona (Acomplia) overnight. Slimona (Acomplia) overnight.

I’ll start with a simple implementation that assumes the week begins on a Sunday.
This can be extended to work with a week beginning on a different day to Sunday:
All of these functions were unit tested and can be verified.
Do I win?
Try the DateJs library. Its a great library with a heap of tools for all your dating needs.
public static bool InSameWeek(DateTime d1, DateTime d2)
{
Calendar cal = new GregorianCalendar();
int weekNo1 = cal.GetWeekOfYear(d1, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
int weekNo2 = cal.GetWeekOfYear(d2, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
return weekNo1 == weekNo2;
}
Thanks for the answers guys.
Ben’s answer was by far the most comprehensive and I’d lean towards that if I was making a DateTime library (which as Drew suggested, probably already exists).
Andrew’s answer however is much simpler and closer to what I need for this particular purpose.
Here’s what I came up with – essentially a cut down version of Ben’s. Note that
itemDateis the date being tested:Yeah! Slow and simple wins the race. No wait, slow and special…. no wait…..
We should do more of these challenges as I find I always learn something new.
Thanks Andrew for pointing me towards the GregorianCalendar class.
I think Andrew is far from being correct. Dates in different years will result in same week.
And what happens on cases where the 1st of january is a wednesday and you compare 30/Dec with 2/Jan?
I have now the same problem, I think I ll take a look at Ben’s solution.
This should work
public static bool InSameWeek(DateTime d1, DateTime d2)
{
DateTime beginningOfWeekDate1 = d2.AddDays(-(int)d2.DayOfWeek);
DateTime beginningOfWeekDate2 = d2.AddDays(-(int)d2.DayOfWeek);
return beginningOfWeekDate1 == beginningOfWeekDate2;
}
Thanks Ben!
ops, there’s copy paste bug there.
DateTime beginningOfWeekDate1 = d1.AddDays(-(int)d1.DayOfWeek);