Click here to Skip to main content
15,915,093 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to get first and last date given a year and a weeknr Pin
livez9-Dec-09 3:49
livez9-Dec-09 3:49 
GeneralRe: How to get first and last date given a year and a weeknr Pin
Richard MacCutchan9-Dec-09 4:06
mveRichard MacCutchan9-Dec-09 4:06 
GeneralRe: How to get first and last date given a year and a weeknr Pin
livez9-Dec-09 4:43
livez9-Dec-09 4:43 
GeneralRe: How to get first and last date given a year and a weeknr Pin
Richard MacCutchan9-Dec-09 5:03
mveRichard MacCutchan9-Dec-09 5:03 
GeneralRe: How to get first and last date given a year and a weeknr Pin
livez9-Dec-09 20:06
livez9-Dec-09 20:06 
GeneralRe: How to get first and last date given a year and a weeknr Pin
livez9-Dec-09 23:00
livez9-Dec-09 23:00 
AnswerRe: How to get first and last date given a year and a weeknr Pin
Abhinav S9-Dec-09 4:03
Abhinav S9-Dec-09 4:03 
AnswerRe: How to get first and last date given a year and a weeknr Pin
OriginalGriff9-Dec-09 4:04
mveOriginalGriff9-Dec-09 4:04 
DateTime does not appear to handle week of year at all - much to my suprise. Fortunately, I had to implement this for a real-time project many years ago. For the full rules, look for ISO-8601 which is the standard reference for dates and times, but:

1) Week number is 1 - 53.
2) Weeks start on Monday.
3) Week one is always the week with the first Thursday of the new year. I.e., if January the 1st is a Monday, Tuesday, Wednesday or Thursday, it is in week 1. Otherwise it is in the final week of the previous year (which could be week 51, 52, or 53 dependant on when week 1 was in that year).

Yes, this means that December 29th, 30th and 31st could be in Week 1 of the new year!

All those who believe in psycho kinesis, raise my hand.

AnswerRe: How to get first and last date given a year and a weeknr Pin
David Skelly9-Dec-09 4:14
David Skelly9-Dec-09 4:14 
GeneralRe: How to get first and last date given a year and a weeknr Pin
livez9-Dec-09 4:17
livez9-Dec-09 4:17 
GeneralRe: How to get first and last date given a year and a weeknr Pin
Richard MacCutchan9-Dec-09 4:23
mveRichard MacCutchan9-Dec-09 4:23 
GeneralRe: How to get first and last date given a year and a weeknr Pin
David Skelly9-Dec-09 4:25
David Skelly9-Dec-09 4:25 
GeneralRe: How to get first and last date given a year and a weeknr Pin
Richard MacCutchan9-Dec-09 5:04
mveRichard MacCutchan9-Dec-09 5:04 
QuestionHow to make FolderBrowserDialog TopMost window. Pin
Calla9-Dec-09 3:09
Calla9-Dec-09 3:09 
AnswerRe: How to make FolderBrowserDialog TopMost window. Pin
Calla9-Dec-09 3:20
Calla9-Dec-09 3:20 
QuestionDo not close ContextMenuStrip Pin
eyalle9-Dec-09 2:14
eyalle9-Dec-09 2:14 
AnswerRe: Do not close ContextMenuStrip Pin
BillWoodruff9-Dec-09 12:19
professionalBillWoodruff9-Dec-09 12:19 
GeneralRe: Do not close ContextMenuStrip Pin
eyalle9-Dec-09 19:59
eyalle9-Dec-09 19:59 
GeneralRe: Do not close ContextMenuStrip Pin
BillWoodruff11-Dec-09 5:06
professionalBillWoodruff11-Dec-09 5:06 
GeneralRe: Do not close ContextMenuStrip Pin
eyalle13-Dec-09 20:38
eyalle13-Dec-09 20:38 
GeneralRe: Do not close ContextMenuStrip Pin
BillWoodruff14-Dec-09 3:25
professionalBillWoodruff14-Dec-09 3:25 
QuestionPositioning MdiChild in the Parent Form Pin
Randal Vance Cunanan9-Dec-09 2:14
Randal Vance Cunanan9-Dec-09 2:14 
AnswerRe: Positioning MdiChild in the Parent Form Pin
Randal Vance Cunanan9-Dec-09 2:18
Randal Vance Cunanan9-Dec-09 2:18 
Questionclasses as enum (or something like an enum) Pin
Nathan Gloyn9-Dec-09 1:53
Nathan Gloyn9-Dec-09 1:53 
AnswerRe: classes as enum (or something like an enum) Pin
Keith Barrow9-Dec-09 2:32
professionalKeith Barrow9-Dec-09 2:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.