Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JulianCalander Object doesn't seem to calc day properly

Status
Not open for further replies.

olichap

Programmer
Mar 20, 2001
389
US
I'm trying to utilize the JulianCalander object to return the integer associated with the day of the year but am confused as to why it doesn't seem to calculate the value as it should. For instance the date 06/26/2003 should have a value of 177.

Dim dtJul As New System.Globalization.JulianCalendar()
TextBox1.Text = dtJul.GetDayOfYear("06/26/2003")

The above calculates the value to be 164. Am I not implementing the JulianCalander object correctly? I could certainly add 13 to every value returned by GetDayOfYear but am curious why it calculates the the way it does.

Any ideas?

Thanks,
Oli
 
The Julian calendar loses a day every hundred or so years (from memory it's something to do with leap years).

It may be this that is producing a different value (164) compared to a Gregorian calendar (177) ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top